Getting Started with Linux Tutorial: Detailed file and directory structure

In windows platform, open the "computer", what we see is one of the letter:

Under Linux, we can not see these letters, we see the folder (directory):

In the early UNIX systems, the various manufacturers each defines its own UNIX file system directory, a bit confusing. Shortly after the launch Linux, the file directory was standardized in 1994 for the root directory made uniform standard, the introduction of FHS (Filesystem Hierarchy Standard) hierarchy standard Linux file system. FHS standard specifies the name and role of Linux root directory of each folder, unified the Linux community named chaos. No matter what version of Linux distributions, desktop, applications are Linux coat, file organization, the directory structure is the Linux heart.

Linux Directory Structure

/: Root directory, in general, only the root storage directory, do not store items, / etc, / bin, / dev, / lib, / sbin should be placed in the root directory of a partition

/ Bin: / usr / bin: executable binary files directory, commonly used commands such as ls, tar, mv, cat and so on.

/ Boot: put some files used when starting linux system. / Boot / vmlinuz for the linux kernel file, and / boot / gurb. It recommended a separate partition, partition size to 100M

/ Dev: file storage device linux system, access a file in the directory, which is equivalent to access a device commonly used to mount the CD mount / dev / cdrom / mnt.

/ Etc: system configuration files directory is not recommended to store executable files in this directory, it is important configuration files have /etc/inittab,/etc/fstab,/etc/init.d,/etc/X11,/etc remember before the backup /sysconfig,/etc/xinetd.d modify the configuration file.

Note: / etc / X11 store associated with the x windows settings.

/ 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, ~ edu edu represents home directory of the user. It recommended a separate partition, and a larger set of disk space to store user data

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

/ Lost + fount: the system generates an error exception, will lose some of this fragment is placed under the directory, usually this directory will automatically appear in the directory means. The load in the hard disk / disk in this directory will be automatically generated directory / disk / lost + found

/ Mnt: / media: mount point default optical disc, the optical disc is usually mounted at / mnt / cdrom, not necessarily, be mounted at any position can be selected.

/ Opt: to host an additional install the software place the directory. Such as: Fedora community development software FC4 use, if you want to install their own new KDE desktop software, you can install the software in the directory. Previous Linux system, used to be placed in the / usr / local directory

/ 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, the more important directories have / proc / cpuinfo, / proc / interrupts , / proc / dma, / proc / ioports, / proc / net / * and so on.

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

/ Sbin: / usr / sbin: / usr / local / sbin: placing executable commands used by the system administrator, such 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.

/ Tmp: general user or program being executed temporary storage directory files, anyone can access the important data can not be placed in this directory

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

/ Usr: application storage directory, / usr / bin storage applications, / usr / share to store shared data, / usr / lib store can not be run directly, but some library files necessary to run many programs. / Usr / local: storage software upgrade package. / Usr / share / doc: system description file storage directory.

/ usr / share / man: 
 the program documentation storage directory, the query will use man ls content /usr/share/man/man1/ls.1.gz suggestions separate partition, set a large disk space

/ Var: during the execution of placement systems 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: after the program or service is started, its PID is stored in the directory. Recommended a separate partition, set a large disk space

Everything is a file

Linux data files (* .mp3, *. Bmp), program files (* .c, *. H, *. O), device files (LCD, touch screen, mouse), Network File (socket) and other management are abstract file, use a unified approach to managing the way.

In Category:

1) ordinary files (data files)
general information file is a file used to store data, programs, etc., are generally long-term storage in the external memory (disks). File is divided into ordinary text files and binary files.
2) directory file
directory file is a file system file directory entry contained in a directory consisting of.
3) the device file
device A document file is used for providing a connection with the device operating system. As a file handle in the Linux system equipment, operating equipment is operating as normal files. Each device corresponds to a device file, stored in the / dev directory.
5) File link
similar to a shortcut in the windows, the link can be divided into soft links (symlinks) and a hard link.
6) pipe file
pipe file is mainly used as a special file to transfer data between processes.
7) socket file
is mainly used as a special file for communication between different computer networks.

Guess you like

Origin blog.csdn.net/GUDUzhongliang/article/details/89949065