The Linux system directory structure can be displayed by command ls/, mainly including the following:
- Bin
The bin is the abbreviation for binary, the command file directory, also known as the binary directory, contains important Linux commands and binary (executable) files for system administrators and ordinary users, including shell interpreters, and the directory cannot contain subdirectories.
- Boot
Here are some of the core files and boot loader files that are used to start Linux, including some linked files and image files.
- Dev
Dev is the abbreviation for device (device), which is the file directory of devices, which holds the corresponding files of devices (terminals, disk drives, CD-ROM and network cards) connected to the computer, including character devices and block devices, and accesses the devices in Linux in the same way as access files.
- etc
This directory is used to store all the configuration files and subdirectories required for system administration. The files in this directory are used by the system administrator, and the normal user has read-only access to most of the files.
- Home
The user's home directory, in Linux, each user has a directory of their own, usually the directory is named after the user's account.
- Lib
This directory contains the system's most basic dynamic link sharing library, which acts like a DLL file in Windows, and almost all applications need to use these shared libraries.
- Lost+found
This directory is generally empty, and when the system shuts down illegally, some files are stored here.
- Media
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.
- Mnt
The directory is provided to allow users to temporarily mount other file systems, we can mount the CD-ROM drive/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, such as you install an Oracle database can be placed 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 is not in the hard disk and 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
- Root
This directory is a user home directory for system administrators, also known as super-permissions.
- Sbin
S is the meaning of super user, which is stored in the system administrator's use of the hypervisor
- SELinux
This directory is the directory Redhat/centos, SELinux is a security mechanism, similar to Windows Firewall, but this mechanism 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 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.
- Tap
This directory is for storing 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
The comparison advanced management program and the system daemon used by the super user.
- /usr/src
The default placement 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, including various log files.
Note: In the Linux system, there are several directories are more important, usually need to be careful not to delete or arbitrarily change the internal files, mainly including/etc,/sbin,/bin,/usr/bin,/usr/sbin and/var
/etc: This is a configuration file in the system, and if you change a file in this directory, it may cause the system to fail to start.
/bin,/sbin,/usr/bin,/usr/sbin: This is the placement directory of the system preset execution file, for example LS is in the/bin/ls directory.
It is noted that/bin,/usr/bin is a directive used by users of the system (a generic user outside of root), while/sbin,/usr/sbin is a command for root.
/var: this is a very important directory, the system ran a lot of programs, then each program will have a corresponding log generated, and these logs are recorded in this directory, specific in the/var/log directory, the other mail preset placement is also here.
Linux Learning Linux system directory brief overview