The file system of Linux is very different from the file system of MS-Windows. I will not say more about the file structure of Microsoft Windows system here. We will mainly summarize the
file system structure of Linux. Linux has only one file tree, the entire file The system starts with a tree root "/". All files and external devices are attached to this file tree in the form of files, including hard disks, floppy disks, CD-ROM drives, modems, etc. This is the same as "drive letter". The basic MS-Windows system is very different. The file structure of Linux reflects the concise and clear design of this operating system. Most of the root directories of Linux distributions that we can come into contact with are mostly the following structure:
/bin /etc /lost+found /sbin /var /boot /root
/home /mnt /tmp /dev /lib /proc /usr
Now I will give you a brief introduction to these directories:
/bin and /sbin
Most of the basic programs for using and maintaining UNIX and
Linux systems are contained in /bin and /sbin.The fame of these two directories includes bin because the executable programs are all binary files.
The /bin directory is usually used to store the most commonly used basic programs, such as:
login
Shells
File operation utility
System utility
Compression tool
The /sbin directory usually stores basic system and system maintenance programs, such as:
fsck fdisk mkfs shutdown lilo init
The main difference between the programs stored in these two directories is that the programs in /sbin can only be executed by root (administrator).
/etc
This directory is generally used to store the configuration files of the entire file system required by the program. Some of the important files are as follows:
This directory is specially used to store the "stray" files that are restored when the system is restarted after the system is abnormal.
/boot
Various files related to system startup are stored under this directory, including system boot programs and system core parts.
/root
This is the home directory of the system administrator (root).
/home
The home directories of all users in the system are stored in /home, which contains the home directories of actual users (persons) and the home directories of other users. The difference between Linux and UNIX is that the home directory of the root user of Linux is usually in /root or /home/root, and UNIX is usually in /.
/mnt
According to the convention, removable media such as CD-ROM, floppy disk, Zip disk, or Jaz should be installed in the /mnt directory. The /mnt directory usually contains some subdirectories, and each subdirectory is an installation of a specific device type. point. E.g:
/cdrom /floppy /zip /win ....
If we want to use these specific devices, we need to mount the external device from the /dev directory with the mount command. Here you may see a win directory, which is a mount point to the windows file system made on my machine, so that I can access my files under windows by visiting this directory. But if your windows file system is in NTFS format, then this method will not work.
/tmp and /var
These two directories are used to store temporary files and frequently changed files.
/dev
This is a very important directory, which stores mirror files of various external devices, some of which we must keep in mind. For example, the name of the first floppy disk drive is fd0; the name of the first hard disk is hda, the first partition of the hard disk is hda1, and the second partition is hda2; the name of the first optical disk drive is hdc; in addition, Use the names of modems and other peripherals. Among so many names, we only need to remember the most commonly used peripherals.
/usr
According to the convention, this directory is used to store programs or files directly related to users of the system. There is a home directory of each system user, which is a small "/" relative to them.
/proc
The content under this directory is a virtual image of the process currently running in the system. Here we can see some directories composed of the number of the currently running process, as well as a kernel file that records the current memory content. Based on personal experience, I think that these directories and what should be stored under them, we should be very skilled in writing down, which is very helpful for our further use of the system.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.