Linux learning - directory structure

In Linux, everything is a file, including directories. The emergence of FHS (Filesystem Hierarchy Standard) has made a unified specification for the file directory system.

  Linux directory structure:

/ - root

  /bin - Directory for executable binaries, such as common commands ls, tar, mv, cat, etc.

  /boot - Bootloader related files, kernel files are also there.

  /cdrom - CD mount point

  /dev - Stores device files under the Linux system, and accessing a file in this directory is equivalent to accessing a device.

  /etc - Configuration files required by all programs.

      Contains startup and shutdown shell scripts for starting/stopping individual programs.

  /home - Directory for all normal users. When adding a user account, the user's home directory is stored in this directory.

  /lib - System library files.

  /lib64 - System library files.

  /lost+found - When a system exception generates an error, some missing pieces will be placed in this directory, usually this directory will automatically appear in the device directory. If the hard disk is loaded in /disk, the directory /disk/lost+found will be automatically generated in this directory.

  /media - Mount a removable device, usually the CD is mounted under /mnt/cdrom, but not necessarily, you can choose any location to mount it.

  /mnt - The user temporarily mounts other file systems, generally recommended to be placed in this directory.

  /opt - Directory where third-party software is placed.

  /proc - Information about system processes. The data in this directory is in memory, such as the system core, external devices, and network status. Since the data is stored in memory, it does not occupy disk space. The more important directories are /proc/ cpuinfo, /proc/interrupts, /proc/dma, /proc/ioports, /proc/net/*, etc.

  /root - The root directory of the system administrator, except root, other users are placed in the /home directory.

  /run - The files needed when the system is running, cannot be deleted casually. But it should be discarded when restarting. It will be regenerated the next time the system is running.

  /sbin - has the same function as /usr/bin, /usr/local/sbi, and places executable commands used by system administrators, such as fdisk, shutdown, mount, etc. Different from /bin, these directories are commands used by the system administrator root, and ordinary users can only "view" but not set and use.

  /snap - ubunut's new package management method, snap packages are generally in the /snap directory.

  /srv - Abbreviation for service, which is the data directory that some network services need to access after they are started. Common services such as WWW, FTP and so on.

  /tmp - Temporary files, including system and user-created temporary files. When the system restarts, all files in this directory will be deleted.

  /usr - Application storage directory.

    /usr/bin holds applications.

    /usr/share holds shared data.

    /usr/lib stores some function library files that cannot be run directly, but are necessary for many programs to run.

    /usr/local: Stores software upgrade packages.

    /usr/share/doc: The directory where the system description files are stored.

    /usr/share/man: The directory where the program description files are stored.

  /var - Variable file.

    /var/log - System log files.

    /var/lib - Package and database files.

    /var/mail - Email.

    /var/spool - print queue.

    /var/lock - lock file.

    /var/tmp - Temporary files needed for multiple reboots.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324690870&siteId=291194637