Introduction to Linux-Root Directory Introduction

The Linux directory is very different from the Windows directory. The Linux directory is similar to a tree, and the top level is its root directory, as shown below:
Insert picture description here

1

The top of the linux file system is /, we call / the root of Linux. That is, the file system of the Linux operating system. The entrance of the Linux file system is /, and all directories, files, and devices are under /. / is the organizer of the Linux file system and the top leader.

2. /bin Binary command directory for all users

Contains binary executable files.

In single-user mode, the common Linux commands you need to use are located in this directory. Commands used by all users of the system are located here.

For example: ps, ls, ping, grep, cp

3. /sbin directory-binary command directory for system management

Similar to /bin, the linux commands in this directory are usually used by system administrators to maintain the system. Example: iptables, reboot, fdisk, ifconfig, swapon commands

4. /etc-configuration file directory

The default path of the configuration file of the binary installation package and the directory where the service startup command is stored

5. /dev-device file directory

Example: sound card, disk, CD-ROM, etc. On Linux systems, any devices and peripherals are stored in this directory in the form of files. Just by accessing a file in this directory, it is equivalent to accessing a device. The more important files are /dev/null, /dev/zero, /dev/tty, /dev/lp*, /dev/hd*, /dev/sd*, etc.

6. /proc-process information and kernel information directory

This directory itself is a virtual file system (virtual filesystem). The data it puts is in the memory, such as system core, process information (process), peripheral device status, network status, etc. Because the data in this directory is in the memory (memory), it does not occupy any hard disk space. More important files (directories) such as: /proc/cpuinfo, /proc/dma, /proc/interrupts, /proc/ioports, /proc/net/*, etc.

7. /var-Variable file directory

var stands for variable file.

If /usr is a directory that will occupy a larger hard disk capacity during installation, then /var is a directory that will gradually occupy the hard disk capacity after the system is running.
Because the /var directory is mainly for files that change regularly, including caches, log files, and files generated by certain software operations, including program files (lock file,
run file), or such as MySQL database Files and so on.

8. /tmp-temporary file directory

Contains temporary files created by the system and users.

When the system restarts, all files in this directory will be deleted.

9. /usr-(Unix Software Resource) the directory where Unix operating system software resources are placed

All system default software will be placed under /usr, including binary files, library files, documentation and source code of secondary programs.

/usr/local contains user programs installed from source. For example, when you install Apache from source, it will be in /usr/local/apache2. (The difference with /sbin and /bin is not necessary) This is a virtual file system, and system resources exist in the form of text information. For example: /proc/uptime

10. /home-home directory of ordinary users

All ordinary users use the home directory to store their personal files.

Example: / home / john, / home / nikita

11. /root-root user home directory

12. /boot-Bootloader file directory

Contains files related to the bootloader.

The initrd, vmlinux, and grub files of the kernel are located under /boot.

例如:initrd.img-2.6.32-24-generic、vmlinuz-2.6.32-24-generic

13. /lib-system library

Dynamic library and module files for storing programs

14. /opt-optional additional application installation directory

opt stands for optional.

Contains additional applications from individual vendors.

Additional applications should be installed in a subdirectory of /opt/ or /opt/.

15. /mnt-mount directory

System administrators can mount other temporary file systems.

16. /media-removable media devices

Temporary directory for mounting removable devices.

For example, /media/cdrom for mounting CD-ROM, /media/floppy for mounting floppy disk drive;

17. /srv-service data directory

srv stands for service. Store the data files required by the service process and some service execution scripts

For example, /srv/cvs contains cvs related data

Guess you like

Origin blog.csdn.net/Houtieyu/article/details/108001826