I don’t know if it is correct. What I understand is that mounting is to associate a certain partition (or the file system of a certain partition) with a certain directory. Entering the directory means entering the partition. I currently only have three partitions. :
I used the df command to check it, as shown in the figure:
Question 1: If a partition mounts a directory, what do the other mounts in the second picture mean?
Question 2: Does a partition have Multiple file systems?
I’m a little confused when I’m new to Linux. I hope my seniors can give me some guidance. Thank you very much!
A partition is a file system that can be mounted to one or more directories. For example, the third partition is mounted to
/home
下。但不是说目录都有磁盘分区对应。目录结构是操作系统维护的一个抽象,即可以映射到磁盘目录上,也可以对应内核的某些数据结构,比如/sys
查看进程信息、/dev
view device information, etc. These directories do not have disk storage.The things that can be mounted are not only disk partitions. You have already seen that tmpfs / devtmpfs are not disk types. If you use the mount command, there will be proc (
/proc
) and other types.According to answer 1, the tmpfs and other mounts in your screenshot are not partitions, that is, they are not "one partition with multiple file systems"
But since you asked... A partition generally has only one file system, but there may be smaller mountable units within the file system, such as btrfs subvolume. In addition, bind mount may also cause one device to correspond to multiple mount points, and the output of df will also appear as "one partition with multiple file systems".
Chaos is normal, you’ve all seen it and got used to it.