Latest web development tutorials

Linux system directory structure

After logging in the system, enter the command in the current command window:

 ls / 

You will see the following figure:

4_20

Tree structure:

003vPl7Rty6E8kZRlAEdc & 690

The following is an explanation of these directories:

  • / bin:
    bin is an abbreviation for Binary, this directory holds the most frequently used commands.

  • / boot:
    Here some of the core is stored in a file when you start using Linux, including some connection files and image files.

  • / dev:
    dev is Device (equipment) of the abbreviation, the directory is stored in an external device Linux, Linux in the way of access methods and devices to access the file is the same.

  • / etc:
    This directory is used to store configuration files and subdirectories all system management needs.

  • / home:
    The user's home directory, in Linux, each user has its own directory, the directory name is based on the general user account named.

  • / lib:
    This directory holds the basic system of shared dynamic link library, its role is similar to Windows in the DLL file. Almost all applications require the use of shared libraries.

  • / lost + found:
    Under normal circumstances this directory is empty, when the system shut down illegal, some files stored here.

  • / Media linux system will automatically recognize some devices, such as U disk, CD-ROM, etc., when the identification, linux will identify the device to mount this directory.

  • / mnt:
    The system provides this directory is to enable users to temporarily mount other file systems, we can drive mounted at / mnt /, and then enter the directory you can view the contents of the CD-ROM drive.

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

  • / proc:
    This directory is a virtual directory, which is the system memory map, we can obtain system information through direct access to the directory.
    But the contents of this directory in memory, we can not modify some files directly on the hard disk inside, for example, can be masked by the following ping command to the host command, so that others can not ping your machine:

    echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
  • / root:
    The directory for the system administrator, who is also known as super user's home directory permissions.

  • / sbin:
    s is the Super User's meaning here is stored in the hypervisor system administrator.

  • / selinux:
    This directory is Redhat / CentOS specific directory, Selinux is a security mechanism, similar to the windows firewall, but this mechanism is more complex, this directory is stored selinux related documents.

  • / srv:
    The directory service started to store some data needs to be extracted.

  • / sys:
    This is a core linux2.6 great changes. This directory is installed in the 2.6 kernel emerging a file system sysfs.

    sysfs file system integrates information on the following three kinds of file systems: for proc file system processes information for devfs device file system and for the pseudo-terminal devpts file system.

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

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

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

  • / usr:
    This is a very important directory, the user a lot of applications and files are placed in this directory, program files directory under similar windows.

  • / usr / bin:
    The application system users.

  • / usr / sbin:
    More advanced management programs and system daemons super users.

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

  • / var:
    This directory contains a constantly expanding with something we were used to modify the directory, who are often placed in this directory. Including log files.

In linux system, there are several directories is more important, usually need to be careful not to accidentally deleted or arbitrarily change the internal documents.

/ Etc: top also mentioned, this is the system configuration file, if you change a file in that directory may cause the system to not start.

/ Bin, / sbin, / usr / bin, / usr / sbin: This directory is placed by default executable file, such as ls is in / bin / ls directory.

It is noteworthy that, / bin, / usr / bin is the instruction to the system (except root outside through user) used by the user, and / sbin, / usr / sbin instruction is used to root.

/ Var: This is a very important directory on your system run a lot of programs, each program will have the appropriate logs are generated, and these logs are recorded to this directory, specifically in / var log directory under / addition default placement mail is here.