Linux into the pit notes (two, Linux system directory structure)




In the Linux world, everything is a file.

Brief introduction

linux file system directory structure is a tree-type layer level, the uppermost layer in this structure is the root "/", and then creating another directory in the directory:

Here Insert Picture Description

After entering the login system

ls /

You see the subdirectory "/" directory:

Here Insert Picture Description


Specific directory structure

The following is a specific directory structure:

  • / bin :
    bin Binary is the abbreviation This directory is the most frequently used commands.

  • / the Boot :
    Here are some of the core stored in files that are used when you start Linux, including some connection files and image files.

  • / dev :
    dev is Device (device) abbreviation is stored in the directory Linux external device, the access device in the manner of Linux and accessed files are the same.

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

  • / 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 to store the system the most basic dynamic link shared libraries, its role is similar to Windows in the DLL file. Almost all applications need to use these shared libraries.

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

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

  • / mnt :
    The system provides this directory is to enable users to temporarily mount other file systems, we can drive mount / 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, you install a ORACLE database you can put this directory. The default is empty.

  • / proc :
    This directory is a virtual directory, which is the system memory map, we can get system information directly access this directory through.
    Contents of this directory on your hard disk but not in memory, we can also directly modify certain files inside, such as the ping command can be shielded by the command of the host, 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, also known as super user's home directory permissions persons.

  • / sbin : S
    is the Super User's meaning here is stored in the system management program used by system administrators.

  • / 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 to store some data to be extracted after the service started.

  • / SYS :
    This is a core linux2.6 great changes. The directory of a file system sysfs 2.6 kernel emerging installation.
    sysfs file system integrates information on the following three kinds of file systems: for proc file system processes information for devfs file system devices and file systems for devpts pseudo terminal.
    The file system is a visual reflection of kernel device tree.
    When a kernel object is created, the corresponding files and directories are created kernel object subsystem.

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

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

  • / usr / bin :
    the application system users.

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

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

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

  • / RUN :
    is an information since the temporary file system, storage system startup. When the system is restarted, the files in this directory should be deleted or cleared. If there is / var / run directory on your system, it should point to run.

Linux directory structure Mind Mapping

Here Insert Picture Description



Reference:
[1]: Rookie Tutorial: Linux system directory structure
[2]: "Silicon Valley is still Hanshun Ping linux tutorial courseware"
[3]: "Bird Brother Linux private kitchens - Fundamentals for the fourth edition of"
[4]: Linux - The directory structure mind mapping

Published 138 original articles · won praise 38 · views 30000 +

Guess you like

Origin blog.csdn.net/sinat_40770656/article/details/103948787