

dev/sda1 / ext4 ARCH rw,noatime,discard,data=ordered 17.6G

findmnt -lo source,target,fstype,label,options,used -t ext4 SOURCE TARGET FSTYPE LABEL OPTIONS USED You can switch from the default tree view to list view with -l, define output columns with -o (similar to lsblk), filter results based on filesystem type with -t etc. 2.18 (July 2010) util-linux includes a tool that allows you to display a list of currently mounted file systems: findmnt The reason why you'd sometimes want to consult /etc/mtab in preference to or in addition to /proc/mounts is that because it has access to the mount command line, it's sometimes able to present information in a way that's easier to understand for example you see mount options as requested (whereas /proc/mounts lists the mount and kernel defaults as well), and bind mounts appear as such in /etc/mtab.Īs of v. Actions performed while /etc/mtab is on a read-only filesystem are also not recorded there. Also, mounts performed in the chroot will be reflected in the chroot's /etc/mtab but not in the main /etc/mtab. For example, the output of stat test.txt looks like this: File: ‘test.txt’. This will give you a detailed output of all the permissions for the file. To use stat, simply type stat filename at the command prompt.

In practice, it's mostly in a chroot that you'll find /etc/mtab files that differ wildly from the state of the system. The stat command is another Linux command that can be used to get file permissions. That means that if you don't use these commands (which is pretty rare), your action (mount or unmount) won't be recorded.
LINUX VIEW FILE DETAILS MANUAL
See the magic and file manual pages for more information. This list is maintained by the mount and umount commands. Many networking configuration files are in /etc as well, and are described in the Networking. There's also a list of mounted filesystems in /etc/mtab. ( There are ways to escape the chroot, mind.) For example, in a chroot, /proc/mounts lists only the filesystems whose mount point is within the chroot. If you have any form of containers on your system, /proc/mounts only lists the filesystems that are in your present container. Note we can also pass a directory such as / to stat instead of a filename. The definitive list of mounted filesystems is in /proc/mounts. The -f (filesystem) option tells stat to report on the filesystem that the file resides on.
