Linux System directory Structure

Source: Internet
Author: User

Linux System directory Structureafter logging into the system, enter the command under the current command window: LS

    

Tree-like structure:

    

    

In a Linux or Unix operating system, all files and directories are organized into an inverted tree structure that starts with a root node.

The topmost layer of the filesystem begins with the root directory, and the system uses / to represent the root directory. Under the root directory, you can either be a directory or a file, and each directory can contain subdirectory files. This can be a huge file system over and over again.

In the Linux file system there are two special directories, a user's working directory, also known as the current directory, you can use a point . the other is the top-level directory of the current directory, also known as the parent directory, you can use two points: to represent.

    • . : Represents the current directory, or it can be used.
    • .. : Represents the previous level of the directory, or you can ... /to represent.

If a directory or file name is at a point. Start, indicates that the directory or file is a hidden directory or file (such as. bashrc). That is, the directory or file is not displayed when you find it by default.

The following is an explanation of these directories:
    • /bin:
      The bin is the abbreviation for binary, which holds the most frequently used commands.

    • /boot:
      Here are some of the core files used when starting Linux, including some connection files and image files.

    • /dev:
      Dev is the abbreviation for device, which stores external Linux devices, and accesses the device in Linux in the same way that it accesses files.

    • /etc:
      This directory is used to store all the configuration files and subdirectories required for system administration.

    • /home:
      The user's home directory, in Linux, each user has a directory of their own, usually the directory name is named after the user's account (according to the previous tutorial created, there will be a master under/home).

    • /lib:
      This directory contains the system's most basic dynamic connection shared library, which acts like a DLL file in Windows. These shared libraries are required for almost all applications.

    • /lost+found:
      This directory is generally empty, and when the system shuts down illegally, some files are stored here.

    • /media:
      The Linux system automatically identifies some devices, such as a USB flash drive, an optical drive, and so on, and when identified, Linux will attach the identified device to this directory.

    • /mnt:
      The directory is provided to allow users to temporarily mount other file systems, we can mount the CD-ROM drive on the/mnt/, and then enter the directory to view the contents of the CD-ROM.

    • /opt:
      This is the directory for the host to install additional software. For example, if you install an Oracle database, you can put it in this directory. The default is empty.

    • /proc:
      This directory is a virtual directory, it is the mapping of system memory, we can access this directory directly to obtain system information.
      The contents of this directory are not on the hard disk but in memory, we can also directly modify some of the files inside, such as can be used to block the host ping command, so that others cannot ping your machine.

        1 >/proc/sys/net/ipv4/icmp_echo_ignore_al
    • /root:
      This directory is a user home directory for system administrators, also known as super-permissions.

    • /sbin:
      S is the Super user's meaning, which is stored in the system administrator's use of the System Management program.

    • /selinux:
      This directory is a unique directory of Redhat/centos, SELinux is a security mechanism, similar to Windows Firewall, but this set of mechanisms is more complex, this directory is to store selinux related files.

    • /srv:
      This directory holds data that needs to be extracted after some services are started.

    • /sys:
      This is a big change in the linux2.6 kernel. This directory installs a new file system Sysfs that appears in the 2.6 kernel.

      The Sysfs file system integrates information from the following 3 file systems: The proc file system for process information, the Devfs file system for the device, and the Devpts file system for the pseudo-terminal.

      The file system is a visual reflection of the kernel device tree.

      When a kernel object is created, the corresponding files and directories are also created in the kernel object subsystem.

    • / tmp:
      This directory is used to store some temporary files.

    • / usr:
      This is a very important directory, the user's many applications and files are placed in this directory, similar to the Program Files directory under Windows.

    • /usr/bin:
      The application that the system user uses.

    • /usr/sbin:
      Super users use the more advanced hypervisor and System daemon.

    • /usr/src: The default drop directory for the kernel source code.

    • / var:
      This directory is stocked with things that are constantly expanding, and we are accustomed to placing directories that are often modified in this directory. Includes various log files.

In the Linux system, there are several directories are more important, usually need to be careful not to accidentally delete or arbitrarily change the internal files. Including (/etc,/bin,/sbin,/usr/bin,/usr/sbin/var)

Linux System directory Structure

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.