Linux system directory structure

1. /: root directory, in general, only the root storage directory, do not store files.

2./etc,/bin,/dev,/lib,/sbin should be placed in the root directory of a partition

3./bin: / usr / bin: (binaries) to store binary executable file. The common commands ls, tar, mv, cat, etc.

4./boot: placing files used when starting linux system.

5./boot/vmlinuz for the linux kernel file, and / boot / gurb. It recommended a separate partition, partition size to 100M

6./dev:(devices) storage device under linux file system, access a file in the directory, which is equivalent to access a device .

7 is used to mount the CD mount / dev / cdrom / mnt.

8./etc:(etcetera) system configuration files directory is not recommended to store executable files in this directory

9. Remember to back up important configuration files before there /etc/inittab,/etc/fstab,/etc/init.d,/etc/X11,/etc/sysconfig,/etc/xinetd.d modify the configuration file. Note: / etc / X11 store associated with the x windows settings. Java environment variables, firewall configuration file

10. / Home: the default user's home directory, create a new user account, the user's home directory are stored in this directory, ~ represents the current user's home directory, ~ test represents the home directory of the user test. Suggested a separate partition, and provided large magnetic disc space, user data store

Need help library when the library catalog system, the program in the implementation process, you need to call some additional parameters, the more important: 11./lib: (library) / usr / lib: / usr / local / lib directory / lib / modules.

12./root: system administrator root's home directory, the system first boot partition for /, so it is best to / root and / placed under a partition.

13./sbin: (super user binaries) / usr / sbin: / usr / local / sbin: executable commands to place the system administrator. As fdisk, shutdown, mount the like. And / bin difference is that these directories are commands to the system administrator root to use, the average user can only "see" and can not set up and use.

14. A / usr: (UNIX Shared Resources) application storage directory, / usr / bin storage applications, / usr / share shared data storage, / usr / lib can not be run directly stored, but it is many programs necessary for the operation of some library file pieces. / usr / local: storage software upgrade package. / usr / share / doc: system description file storage directory. / usr / share / man: the program documentation storage directory, queries /usr/share/man/man1/ls.1.gz in use man ls capacity recommended a separate partition, set a larger disk space. Mysql, tocmat, redis installation

15./var:(variable) during the execution of the system is placed in frequently changing files, log files, such as to change the / var / log, / var / log / message: All of the log file storage directory, / var / spool / mail: e-mail stored in the directory, / var / run: start a program or service

16./opt: to host an additional install the software placed directory. Previous Linux system, used to be placed in the / usr / local directory

17./tmp:(temporary) general user or program being implemented temporary storage directory files, anyone can access the important data can not be placed in this directory

18./srv: the service started need to access the data directory, Web services need to access data such as www stored in srv / in the / www

19./mnt:/media:(mount) mount point default optical disc, the disc is typically mounted to / mnt / cdrom lower, not necessarily, be mounted at any position can be selected.

20./proc: The data in this catalog are in memory, such as system core, peripherals, network status, since the data are stored in memory, so do not take up disk space, more important directory

Above specifies which directory is what to do, but just recommendations, not mandatory constraints!

Guess you like

Origin www.cnblogs.com/liujinqq7/p/12526745.html