Directory |
File contents should be placed |
FHS the list of provisions |
/bin |
The system has a lot of directories for executing files, but/bin is more special. Because the /bin is placed in the single maintenance mode can also be operated instructions. The commands under/bin can be used by root and general account, mainly: Cat, chmod, chown, date, MV, mkdir, CP, Bash and so on. |
/boot |
This directory is mainly used to put the files on the boot, including the Linux core files and boot menu and boot required configuration files and so on. Linux kernel commonly used file name: Vmlinuz, if you are using grub this boot manager, there will be/boot/grub/this directory! |
/dev |
On a Linux system, any device or interface device is present in this directory in the form of a file. All you have to do is access one of the files under this directory to access a device that is more important than /dev/null,/dev/zero,/dev/tty,/dev/lp*,/dev/hd*,/dev/sd*, etc. |
The main configuration files of the
/etc |
system are placed almost in this directory, such as the person's account password file, the start of various services, and so on. In general, the file attributes in this directory are accessible to the general user, but only root has the power to modify it. FHS it is recommended that you do not place executable files (binary) in this directory. The more important documents are: /etc/inittab,/etc/init.d/,/etc/modprobe.conf,/etc/x11/,/etc/fstab,/ etc/sysconfig/ and so on. In addition, the following important directories are:
- /etc/init.d/: Preset startup script for all services is put here, For example, to start or close iptables: "/etc/init.d/iptables start", "/etc/init.d/iptables stop"
- /etc/xinetd.d/: This is the configuration file directory of the various services that are called Super Daemon Management.
- /etc/x11/: The various configuration files related to x Window are here, especially xorg.conf this x Server configuration file.
|
/home |
This is the system default user home directory (home directory). When you add a general user account, the default home directory will be standardized here. More importantly, the home directory has two types of code: ~: Represents the current user's home directory, and ~vbird: it represents vbird home directory! |
/lib |
The system has a much more functional library, and /lib places a library of functions that will be used at boot time, as well as a function library that the instructions under/bin or/sbin will call. What is a function library? You can think of him as a "plug-in", some instructions must have these "plug-in" to be able to successfully complete the implementation of the program meaning. It is especially important to /lib/modules/this directory, because the directory will place the core related modules (drivers)! |
/media |
Media is the "medium" of English, as the name implies, this /media is placed under the removable device! Such devices as floppy disks, CDs, DVDs and so on are temporarily mounted here. Common file names are:/media/floppy,/media/cdrom, and so on. (Our disc image files are usually mounted in the media directory) |
/mnt |
If you want to temporarily mount some additional devices, it is generally recommended that you place them in this directory. In ancient times, the use of this directory is the same as/media! Just after the/media, this directory is used for temporary loading. |
/opt |
This is the directory for third-party software placement. What is third party collaboration software? For example, the KDE desktop Management system is a standalone program, but it can be installed on a Linux system, so KDE software is recommended to be placed in this directory. Also, if you want to install additional software on your own (not provided by the original distribution), you will be able to install your software here as well. However, in the previous Linux system, we are still accustomed to place in the/usr/local directory! |
/root |
The home directory of the system administrator (root). The reason for this is that if you go into single-player maintenance mode and only mount the root directory, that directory will be able to have the root home directory, so we would like Root home directory and root directory in the same partition slot. |
/sbin |
Linux has a lot of instructions to set up the system environment, these instructions only root can be used to "set up" system, the other users can only be used to "query" only. placed under the/sbin for the boot process required, which includes the boot, repair, restore the system required instructions. As for some server software programs, it is generally placed in the/usr/sbin/. The system binaries generated by the natively installed software are placed in the/usr/local/sbin/. Common directives include: fdisk, fsck, Ifconfig, Init, MKFS, and so on. |
/srv |
SRV can be considered an abbreviation for "service", which is the data directory to be used by some network services after they are started. Common services such as WWW, FTP and so on. For example, the Web page data required by the WWW server can be placed inside the/srv/www/. |
/tmp |
This is where the general user or the executing program temporarily places the file. This directory is accessible to anyone, so you need to clean it up regularly. Of course, important data can not be placed in this directory Ah! Because FHS even suggested that the data at/TMP should be removed when booting |
List of non-FHS provisions |
/lost+found |
This directory is a directory that is generated using the standard EXT2/EXT3 file system format, in order to place some missing fragments into this directory when the file system has an error. This directory usually exists at the top level of the splitter slot, for example if you add a hard disk to/disk, and the system will automatically generate a directory like "/disk/lost+found" |
/proc |
This directory itself is a "virtual file system (FileSystem)" Oh! The data he places are in memory, such as the system core, the trip information (process), the state of the peripheral device, and the network status. Because the data in this directory is in memory, so it does not occupy any hard disk space! More important documents such as:/proc/cpuinfo,/PROC/DMA,/proc/interrupts,/proc/ioports,/proc/net/* and so on. |
/sys |
This directory is very similar to/proc, but also a virtual file system, which is also the key to record the information related to the core. Including the core modules currently loaded and the core detected hardware device information, and so on. This directory also does not account for hard disk capacity |
Usr |
The second level of content by the FHS specification, in/usr This directory, contains the system's main program, graphics interface required files, additional library, the local side of the software installed by itself, as well as shared directories and files, etc., can be found in this directory. In fact, he is a bit like the "Program Files" and "WinNT" in the Windows operating system to combine the two directories! The important sub-directories under this directory are:
- /usr/bin,/usr/sbin: directory where the general identity user and the system administrator can perform file placement;
- /usr/include:c/c++ and other programming languages such as the header and the containing file (include), when we install some data in tarball way (*.tar.gz way), we will use a lot of included files inside! ;
- /usr/lib: The library files directory of each application software;
- /usr/local: The default directory where the native-side software installs itself. It is also available for the/OPT directory. After you have installed Linux, basically all the equipment you have, but the software can always be upgraded, for example, you want to upgrade your proxy service, the software is usually the default installation is in the/usr/local (Local is "locally" meaning), at the same time, After the installation of the resulting execution files, in order to be different from the original execution of the system, so the upgraded execution file is usually placed in the/usr/local/bin this place.
- /usr/share: A directory for shared file placement, such as the bottom two directories:
- /usr/share/doc: Place some system documentation, for example, if you have grub installed, then look it up under that directory and you can find the GRUB documentation! It is very convenient!
- /usr/share/man:manpage file directory, when using man, will go to query the path! For example, when you use the man ls command, you will find the contents of/usr/share/man/man1/ls.1.gz this document!
- /usr/src:linux system-related program code placement directory, such as/usr/src/linux as the core of the original code!
- /USR/X11R6: Almost all of the execution files required for the X Window system within the systems are placed here!
|
/var |
This directory is also important and is the second-level directory content of the FHS specification. His main place is for the system execution process, the normal changes in the file placement directory. For example, a cached file (cache), or a log file that is changed at any time, is placed in this directory. In addition, some of the database files that are written during the execution of the software, such as the MySQL database, are also written in this directory! The following important directories are:
- /var/cache: Some temporary disks in the process of the program files;
- /var/lib: The program itself executes the process, need to use the data files placed in the directory, for example, locate this database and MySQL and RPM database system, are written in this directory.
- /var/log: directory where the login file is placed. It's important! For example/var/log/messages is a file of all login files!
- /var/lock: Some appliances have a one-time write feature, such as tab (Tape drive), at which point, in order to worry about being disturbed by others to disrupt the operation of the action, therefore, The device will be lock (locked) to make sure that the device can only be used by a single program!
- /var/run: When some programs or services are started, their PID will be placed in this directory!
- /var/spool: is where some queue data is stored. For example, when the host receives the e-mail, it will be placed in the/var/spool/mail, if the letter is temporarily not sent out, it will be placed in the/var/spool/mqueue directory, the user task Assignment (cron) is placed in the/var/spool/cron Of
|