Explanation of the meaning of Linux system root directory

Linux system root directory explanation

The point of writing this blog is to better understand the location of relevant files after CDH is installed. Similarly, you can better understand the meaning of system directory settings

Overall directory structure

Insert picture description here
Insert picture description here

meaning

/bin

binary is the binary executable file directory, mainly used for specific applications
containing binary executable files.
The commands used by all users of the system are set here, for example: ps, ls, ping, grep, cp, etc.

/boot

Contains files related to the bootloader.
The initrd, vmlinux, and grub files of the kernel are located under /boot.
For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic

/dev

dev is the abbreviation of Device (device), Linux external devices are stored in this directory, and the way to access the device in Linux is the same as the way to access files.
Contains device files.
These include terminal devices, USB, or any device connected to the system. For example: /dev/tty1, /dev/usbmon0

/etc

etc is the abbreviation of Etcetera (etc.), this directory is used to store all the configuration files and subdirectories needed for system management.

/home

The home directory of ordinary users. In Linux, each user has his own directory. Generally, the name of the directory is named after the user's account, such as alice, bob and eve in the figure above.

/lib

lib is the abbreviation of Library (library). This directory stores the most basic dynamic link shared libraries of the system, and its function is similar to DLL files in Windows. Almost all applications need to use these shared libraries.

/lib64

Kernel-level library

/lost+found

This directory is generally empty. When the system is shut down illegally, some files are stored here.

/media

The linux system will automatically recognize some devices, such as U disk, CD-ROM, etc. After recognition, Linux will mount the recognized device to this directory. For the server, the directory can be deleted

/ mnt

The system provides this directory to allow users to temporarily mount other file systems. We can mount the CD-ROM drive on /mnt/, and then enter the directory to view the contents of the CD-ROM drive.


This directory usually contains the mount point of the file system that is mounted after the system boots. For example, the default CD mount point is /mnt/cdrom/.

/opt

The optional additional application
opt is the abbreviation of optional, which is a directory for installing additional software on the host. For example, if you install an ORACLE database, you can put it in this directory. The default is empty.

/proc

Contains information about system processes.
This is a virtual file system that contains information about running processes. For example: the information related to a specific pid contained in the /proc/{pid} directory.
This is a virtual file system, and system resources exist in the form of text information. For example: /proc/uptime
supplement
proc is the abbreviation of Processes (process), /proc is a pseudo file system (that is, virtual file system), which stores a series of special files of the current kernel running state, this directory is a virtual The directory is a mapping of system memory. We can directly access this directory to obtain system information.
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, you can use the following command to block the host's ping command, so that others cannot ping your machine:

/root

This directory is the home directory of the root user, and other users are under /home, which fully reflects the authority and security of the root user in the Linux system

/run

It is a temporary file system that stores information since the system was started. When the system restarts, the files in this directory should be deleted or cleared. If you have a /var/run directory on your system, you should make it point to run.

/sbin

commands in this dir are all system installed
super user commands super user commands system management commands, here are the management programs used by system administrators.

Just like /bin, /sbin also contains binary executable files.
However, the linux commands in this directory are usually used by system administrators to maintain the system. For example: iptables, reboot, fdisk, ifconfig, swapon commands.

/srv

This directory stores some data that needs to be extracted after the service is started.

/sys

This is a big change in the Linux 2.6 kernel. A new file system sysfs in the 2.6 kernel is installed in this directory.
The sysfs file system integrates the following three types of file system information: the proc file system for process information, the devfs file system for devices, and the devpts file system for pseudo-terminals.
The file system is an intuitive 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

tmp is the abbreviation of temporary (temporary). This directory is used to store some temporary files.
Contains temporary files created by the system and users.
When the system restarts, all files in this directory will be deleted.

/usr

/usr/bin: run scripts for some software installed later by usercommands for applications
/usr/sbin: super user commands for applications some management programs for super users
/usr/X11R6/bin: X application user commands
/usr/X11R6/sbin: X application super usercommands

/where

Var is the abbreviation of variable. This directory contains things that are constantly expanding. We are used to putting those frequently modified directories in this directory. Including various log files.
This is a very important directory. There are many programs running on the system, and each program will have a corresponding log generated, and these logs will be recorded in this directory, specifically in the /var/log directory. Suppose the placement is also here.

supplement

Important catalog

• Home directory: /root, /home/username
• User executable files: /bin, /usr/bin, /usr/local/bin
• System executable files: /sbin, /usr/sbin, /usr/local/ sbin
• Other mount points: /media, /mnt
• Configuration: /etc
• Temporary files: /tmp
• Kernel and Bootloader: /boot
• Server data: /var, /srv
• System information: /proc, /sys
• Shared Libraries: /lib, /usr/lib, /usr/local/lib

executable file

  • /bin

commands in this dir are all system installed user commands

  • /sbin

commands in this dir are all system installed super user commands Super user commands system management commands, here are the management programs used by system administrators

  • Executable files under /usr

/usr/bin: run scripts of some software installed later by usercommands for applications

/usr/sbin: super user commands for applications
/usr/X11R6/bin: X application user commands
/usr/X11R6/sbin: X application super usercommands

/lib64 /usr/lib64 /usr/local/lib64

/lib64 is kernel-level,
/usr/lib64 is system-level, and
/usr/local/lib64 is user-level.

Guess you like

Origin blog.csdn.net/dbc_zt/article/details/109648830