First, take a look at the first-level directory structure of Linuxi:
Ls:
/: represents the root directory, the file system entry, and the highest level directory.
bin and Sbin: command to save the directory, Bin is normal user can, Sbin is the root user,/bin stored the system required the basis of the command
There is also a bin and sbin directory under/usr/: Also used to save the system commands, the same, under the bin is normal user can execute, sbin under the root user can execute
Boot: Start directory, save the boot related data and files, including the Linux kernel and the system boot program required files, so note: do not often store files in the boot directory, in case the boot directory is full, the system may not get up.
Dev: device files to save the directory, the storage is the hardware aspects of the file, such as sound card, disk, not familiar with the general do not move.
etc: the configuration file to save the directory, generally store some server configuration files, such as user account password configuration file.
Home : General user's home directory;
Root: The home directory of the root user;
Temp: temp directory, storing temporary data
opt: indicates an optional meaning, and some packages are also installed here, which are custom packages. Some of our own compiled packages can be installed in this directory;
proc: When the operating system is running, process information and kernel information (CPU, hard disk partition, memory information, etc.) are stored here. /proc directory is a disguised file system proc mount directory, Proc is not a real file system, this is a special directory in the system, is actually a real-time, memory-resident file system.
SYS: and the proc directory cannot be directly manipulated, this is the mount point where memory is saved.
usr: a directory of system storage programs, such as commands, help files;
var: system-related document content, this directory is often changed, in/var/log here is to store the system log directory,/var/www/directory is defined apace Server site Directory,/var/lib/used to store some library files, such as MySQL ,/var/spool/printer, mail, proxy server, etc. spool directory
Lib: the system library to save the directory, library storage location, the so-called function library, can be understood as in the operating system, not all the functions written in Linux, some of the commonly used functions written in a library, these libraries are stored under the/lib, It's OK to call it when you need it, to avoid writing it all in Linux so that Linux becomes very large and slow, so you can save it as a library and call it when you use it.
mnt and media: The system mounts the directory. All storage devices to be used as mount, mount can be used as an allocation letter, the system gave the MNT directory and media directory, let us use to do external storage device letter, media used to hang the CD, MNT used to hang a U disk, mobile hard drive.
Lost+found: in the ext2 or ex3 file system, when the system crashes unexpectedly or the machine shuts down unexpectedly, some of the file fragments are stored here, and when the system starts, the Fsck tool checks here and repairs the corrupted file system, sometimes the system has problems, Many files are moved to this directory, may be repaired manually, or moved to the original location of the file, when the system crashes or unexpectedly shuts down, fsck will take a long time to detect the file system, trying to repair the found incorrect files, the repaired files will be placed in this directory.
some important sub-directories:
/etc/init.d This directory is used to store scripts that are launched by the system or server in System V mode, which is common in systems that are started or initialized in Mode v.
/usr/local : This directory is generally used to store the user self-compiled installation software storage directory, usually through the source package installed software, not specifically designated installation directory, generally installed in this directory.
/usr/src is the kernel source directory, and some systems will be installed in the source software package here, such as Fedora/redhat, when we install FIEL.SRC.RMP, these packages are installed in the/usr/src/redhat corresponding directory.
/var/log System log storage, analysis log to see this directory of things;
See more : http://yangrong.blog.51cto.com/6945369/1288072 and http://blog.csdn.net/dlutbrucezhang/article/details/8809841
Common directory Learning notes for Linux