Introduction to the Linux directory tree

Source: Internet
Author: User
Tags file system split iptables root directory linux

The Linux directory tree is as follows:

Detailed

/bin: The system has a lot of directories to place the execution file, but/bin is more special. Because/bin is placed in the single maintenance mode can also be manipulated instructions. The instructions under/bin can be used by root and the general account number, mainly: Cat, chmod, chown, date, MV, mkdir, CP, Bash, and other commonly used instructions.

/boot: This directory is mainly in the boot will be used in the file, including the Linux core files and boot menu and boot required profile and so on. Linux kernel commonly used file name: Vmlinuz, if you are using GRUB this boot management program, there will also be/boot/grub/this directory.

/dev: On Linux systems, any device or peripheral device exists in this directory in the form of a file. All you have to do is access one of the files at the bottom of the directory, which means you're accessing a device. More important files are/dev/null,/dev/zero,/dev/tty,/dev/lp*,/dev/hd*,/dev/sd*, etc.

/ETC: Most of the system's main profiles are placed in this directory, such as the person's account password file, the various service start files, and so on. Generally, the file attributes in this directory can be accessed by the general user, but only the root has power to modify. FHS recommends that you do not place an executable file (binary) in this directory. The more important files 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/: All service preset boot script is placed here, for example to start or turn off iptables: "/etc/init.d/iptables start", "/etc/init.d/iptables Stop"

/etc/xinetd.d/: This is the directory of the various services that are called Super Daemon Management.

/ETC/X11/: The various profiles associated with X Window are here, especially xorg.conf this x Server profile.

/home This is the system preset user home directory. When you add a generic user account, the preset user home directory will be the norm here. More importantly, the home directory has two types of code OH:

~: Represents the current user's home directory, and

~dmtsai: It represents Dmtsai's home catalogue!

/lib: The system's library of functions is very much, and/lib is placed in the function library that will be used when the power is on, and the function library that the instruction under/bin or/sbin will call. What is a library of functions? You can think of him as a "plug-in", some instructions must have these "plug" to be able to successfully complete the program implementation of the meaning. It is particularly important to/lib/modules/this directory, because the directory will place the core-related modules (drivers) Oh!

/media:media is the "media" in English, as the name suggests, this/media is placed under the removable device! The devices including floppy discs, CDs, DVDs and so on are temporarily attached. Common file names are:/media/floppy,/media/cdrom and so on.

/MNT: If you want to temporarily mount some additional devices, it is generally recommended that you put 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 mounting.

/OPT: This is the directory where Third-party Third-party software is placed. What is a third-party third-party collaboration software AH? For example, the KDE desktop management system is a stand-alone project, but it can be installed on a Linux system, so KDE software is recommended for this directory. In addition, if you want to install additional software on your own (not provided by the original distribution), you can also install your software here. However, in the previous Linux system, we still used to be placed in the/usr/local directory!

/root: The home directory of the system administrator (root). The reason for this is that if you go into the single maintenance mode and only mount the root directory, the directory will have the root home directory, so we would like to place the root directory in the same split slot as the roots.

/sbin:linux has very many instructions to set up the system environment, these instructions only root can be used to "set" the system, other users can only be used for "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, they are generally placed in/usr/sbin/. As for the system binary that is produced by the computer's own installed software, it is placed in the/usr/local/sbin/. Common directives include: fdisk, fsck, Ifconfig, Init, MKFS, and so on.

/srv:srv can be regarded as the abbreviation for "service", the data directory that these services need to use after the network service is started. Common services such as WWW, FTP, and so on. For example, the Web page information required by the WWW server can be placed in the/srv/www/.

/tmp: This is where the file is temporarily placed by the general user or the program being executed. This directory is accessible to anyone, so you need to clean it up regularly. Of course, important information cannot be placed in this directory. Because FHS even recommended that when you turn on the boot, you should delete the data in/TMP.

/lost+found: This directory is a directory that is produced using a standard EXT2/EXT3 file system format in order to place some of the missing fragments into this directory when there is an error in the file system. This directory usually exists at the top of the split slot, for example, if you install a hard drive in/disk, it automatically generates a directory "/disk/lost+found" under this system.

/proc: This directory itself is a "virtual filesystem", where he places information in memory, such as system core, travel information (process), peripheral device status and network status, and so on. Because the information in this directory is in memory, so it does not account for any hard disk space Ah! More important files such as:/proc/cpuinfo,/PROC/DMA,/proc/interrupts,/proc/ioports,/proc/net/* and so on.

/sys: This directory is actually very similar to/proc, but also a virtual file system, mainly to record the core-related information. This includes the core modules that are currently loaded and information about the hardware detected by the core, and so on. This directory also does not account for hard disk capacity.

/usr/x11r6/: The directory that was placed for the X Window system important data was named X11R6 because the last X version was 11th edition and the 6th time it was released.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.