The role of each directory in the linux root directory

# ls -a


/bin: Binary , stores the most frequently used commands

/boot: Stores some core files used when Linux starts , including some connection files and image files.

/dev: Device , this directory stores Linux external devices. The way to access devices in Linux is the same as the way to access files.

/etc: Stores all configuration files and subdirectories required for system management.

/home: The user's home directory, each time a user is created, a directory with the same name will be created in this directory.

/lib: Stores the most basic dynamic link shared library of the system, which is similar to the DLL file in Windows . Almost all applications need to use these shared libraries.

/lost+found: Generally empty, when the system shuts down illegally, some files are stored here.

/media: The Linux system will automatically identify some devices, such as U disk, CD-ROM, etc. After identification, Linux will mount the identified device to this directory.

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

/opt: The directory where the additional installation software of the host is placed. Such as installing Oracle database. Default is empty.

/proc: This is a virtual directory, it is a mapping of system memory, we can get system information by directly accessing this directory. The content of this directory is not on the hard disk but in the memory. We can also directly modify some files in it. For example, we can block the ping command of the host through the following command, so that others cannot ping your machine.

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

/root: This directory is the home directory of the system administrator, also known as the super-authorized user.

/sbin: System management program used by system administrators.

/selinux: This directory is unique to Redhat/CentOS . Selinux is a security mechanism, similar to the Windows firewall, but this mechanism is more complicated. This directory is used to store selinux -related files.

/srv: Store some data that needs to be extracted after the service is started.

/sys: The sysfs file system supported by the Linux kernel is mapped in this directory. Buses, drivers and devices in the Linux device driver model can all find corresponding nodes in sysfs . When the kernel detects that a new device has appeared in the system, the kernel will generate a new directory for the new device in the sysfs file system.

 

/tmp: used to store some temporary files.

/usr: Stores user applications and files, similar to Windows program files.

/usr/bin: Applications used by system users.

/usr/sbin: The more advanced management programs and system daemons used by superusers.

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

/var: Stores things that are constantly expanding. We are used to putting those frequently modified directories in this directory, including various log files.

More important directories:

/etc , the system configuration file, if a file in this directory is changed, the system may not be able to start.

/bin, /sbin, /usr/bin, /usr/sbin , the directory where the specified files are placed by default. /bin, /usr/bin, instructions for system users (general users except root ), /sbin, /usr/sbin, instructions for root .

/var , a very important directory, there are many programs running on the system, each program will generate a corresponding log, and these logs will be recorded in this directory, specifically in the /var/log directory, and the default of the other mail Placement is also here.



This article is a record for personal understanding of other tutorials.




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324908552&siteId=291194637