Linux directory structure and the main contents of the directory detailed analysis _unix Linux

Source: Internet
Author: User

The "/" root directory section has the following subdirectories:
The/usr directory contains all the commands, libraries, documents, and other files. These files will not be changed during normal operation. This directory also contains the main applications of your Linux distribution, such as Netscape.

The/var directory contains files that were changed during normal operation: spool files, log files, lock files, temporary files, and page format files.

The/home directory contains user files: parameter settings files, personalized files, documents, data, emails, cached data, and so on. This directory should be retained at the system level.

The/proc directory contains the entire illusory file. They do not actually exist on the disk or occupy any space. (You can display their size with ls–l) When you view these files, you are actually accessing information in memory that is used to access the system

/bin the execution files (binaries) that are required for system startup, which can be used by ordinary users.
/sbin System execution files (binary), which are not intended to be used by ordinary users. (normal users can still use them, but specify a directory.) )

/ETC the operating system's configuration file directory.

/root the home directory of the system administrator (also known as the superuser or root user).

/dev Device file directory. Linux is used as a file, so the hardware is abstracted, easy to read and write, network sharing, and temporary loading into the file system. Under normal circumstances, the device will have a separate subdirectory. The contents of these devices will appear in separate subdirectories. Linux does not have a so-called driver.

/lib a shared library of programs and core modules in the root file system directory.

/boot the file used to bootstrap the loader (LILO or GRUB). These files are loaded first when the computer is started (if there are multiple operating systems that may allow you to choose which operating system to start). This directory will also contain the Linux kernel (compressed file vmlinuz), but the Linux kernel can also exist elsewhere, as long as you configure LILO and Lilo knows where the Linux kernel is.

/opt optional applications, such as KDE under REDHAT 5.2 (REDHAT 6.0, KDE is placed in other xwindows applications, and the main execution program is in the/usr/bin directory)

/tmp temporary file. The directory will be automatically cleaned up.

/lost+found files recovered on file system repair

The more important parts of the "/usr" directory are:
/USR/X11R6 x-windows System (version one, release 6)

/usr/x11 with/USR/X11R6 (/USR/X11R6 symbolic Connection)

/usr/x11r6/bin a large number of small x-windows applications (and possibly some symbolic connections to large execution files in other subdirectories).
/usr/doc Linux documentation (in an updated system, this directory is moved to/usr/share/doc).

/usr/share is independent of your computer structure's data, such as the words in a dictionary.

/usr/bin and/usr/sbin resemble directories (/bin and/sbin) corresponding to the "/" root directory, but are not used for basic startup (for example, in emergency maintenance). Most of the commands are in this directory.

/usr/local applications that are installed by local administrators (and may also have separate subdirectories for each application). After "main" is installed, this directory may be empty. The contents of this directory should exist after reinstalling or upgrading the operating system.

/usr/local/bin may be a small application installed by a user, and some symbolic connections to large applications in the/usr/local directory.

Contents of/proc Directory:
/proc/cpuinfo information about the processor, such as type, manufacturer, model, and performance.
/proc/devices the list of all devices configured by the currently running kernel.
/PROC/DMA The DMA channel that is currently in use. /proc/filesystems the file system that is currently running the kernel.
/proc/interrupts is using the interrupt, and how many interrupts there have been.
/proc/ioports the I/O port that is currently in use.
For example, use the following command to read the CPU information of the system.
Cat/proc/cpuinfo

Summary:
  users should have the file in the/home/user_login_name directory (and its subdirectories).

  Local Administrators in most cases install additional software in the/usr/local directory and sign up to the main execution program under/usr/local/bin. All settings of the

  system are in the/ETC directory.

  do not modify anything in the root directory ("/") or the/usr directory unless you really know what to do. These directories are best aligned with Linux publishing.

  Most of the tools and applications are installed in the directory:/bin,/usr/sbin,/sbin,/usr/x11/bin,/usr/local/bin. The

  All files under a single directory tree. There is no so-called "driver".

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.