0
$ mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda4 on /home type ext4 (rw,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=t)

The format of the output of mount is a sequence of lines, where each line has the format "A on B type C".

Do I understand correctly that

  • B is the mount point
  • C is the file system type. Examples of C are ext4, proc, sysfs, tmpfs, fusectl, debugfs, securityfs, devtmpfs, devpts, pstore, binfmt_misc, cgroup, fuse.gvfsd-fuse.
  • what is A? Examples of A are /dev/sda3, proc, sysfs, none, udev, devpts, tmpfs, binfmt_misc, systemd, gvfsd-fuse.
Tim
  • 101,790

2 Answers2

1

The output of the mount command with no arguments is what the input of mount was when the filesystem was mounted (i.e., what its arguments were, what it detected the filesystem to be, and/or what was configured in /etc/fstab).

The mount command expects at least three bits of information: the thing to mount, the place to mount it on, and the type of the filesystem that is being mounted. The type is specified with the -t option to mount, but can often be autodetected, or can be specified in fstab. For filesystems that represent data on an actual device (such as ext4, xfs, or VFAT), the thing to mount is the device node of the device being mounted. For virtual filesystems such as procfs or sysfs, the concept of a thing to be mounted is meaningless (they simply expose some data from the kernel to userspace, there is no device or some such), but mount still requires the information. In theory, you can specify anything you want as the thing for such filesystems (try it: mkdir /tmp/sys; mount -t sysfs weirdthingthatismounted /tmp/sys; mount), but conventionally a name that describes the filesystem being mounted is used instead (e.g., the name of the filesystem, or the mountpoint with any slashes removed)

The mount command furthermore also takes options that may change the behavior of the filesystem (e.g., a nodev mount option), and it passes all that information on to the kernel, which connects the filesystem to the mount point, and also exposes the data that it was given in /proc/mtab. When you later run mount with no arguments, it simply outputs the data from that file.

The format is then (to use the terms from my previous paragraphs):

*thing* on *place* type *type* (*options*)
0

A could be the physical device, as you see it in 'fdisk -l' or could be a node/file in special cases.