Mac computer directory

Mac screenshot shortcut keys
Insert image description here

  • System
  • Applications application directory, all GUI applications are installed here by default
  • User stores the user's personal information and configuration. Each user has his own separate directory
  • Library system data files, help files, documents, etc.
  • /bin is the storage directory for traditional unix commands, such as ls, rm, mv, etc.
  • /sbin is the storage directory for traditional Unix management commands, such as fdisk, ifconfig, etc.
  • /usr Third-party program installation directory
  • The subdirectories inside /private store the target directories of link directories such as /tmp, /var, /etc, etc.
  • /tmp is the temporary file storage directory, and its permissions are read and write by everyone. This directory is actually a link to /private/tmp
  • /var stores frequently changing files, such as log files. This directory is actually a link to /private/var
  • /etc is the directory where standard Unix system configuration files are stored, such as user password file /etc/passwd. This directory is actually a link to /private/etc
  • /dev device file storage directory, how to represent /dev/disk0 of the hard disk
  • /Network network node storage directory
  • /Volumes file system mount point storage directory
  • /cores is the directory where core dump files are stored. When a process crashes, a dump file is generated if the system allows it

  • /home
  • /opt

In the Mac system, Mac adopts a Unix-like file system architecture. Although the default user folder of Mac OS X system is "/Users", in order to maintain compatibility with other Unix systems, Mac also provides the "/home" directory to store the user's personal files. At the same time, the "/home" directory can also be used as a backup directory for users' personal files, making it convenient for users to back up and restore data. In addition, some programs may use the "/home" directory as the storage location for user configuration files by default. So although Mac systems also have a "/home" directory, in Mac, it is generally recommended to use the "/Users" directory as the user's home folder.

In macOS systems, the /opt directory is also used to store optional software packages, but it usually does not exist by default in macOS systems.
Software installation on macOS usually takes the form of an application package (.app) and places relevant files in the /Applications directory or the user's home directory. The /opt directory is not a common installation option in macOS systems.
Despite this, some third-party software developers may still choose to install their applications or software packages into the /opt directory to maintain compatibility with other Unix/Linux systems. Doing this will keep the package location consistent with other platforms.
If the /opt directory does not exist on the macOS system, you can use it by creating the /opt directory. Then you can place the corresponding software package or application in the /opt directory for management according to your own needs.
It should be noted that in macOS systems, operating permissions on the /opt directory usually require administrator permissions, and ordinary users may need to use sudo or an account with corresponding permissions to perform read and write operations.

Guess you like

Origin blog.csdn.net/qq_41638851/article/details/132017819