5.9.3.2. Seeing What is Mounted


In addition to mounting and unmounting disk space, it is possible to see what is mounted. There are several different ways of doing this:
  • Viewing /etc/mtab
  • Viewing /proc/mounts
  • Issuing the df command
5.9.3.2.1. Viewing /etc/mtab
The file /etc/mtab is a normal file that is updated by the mount program whenever file systems are mounted or unmounted. Here is a sample /etc/mtab:
 /dev/sda3 / ext3 rw 0 0 none /proc proc rw 0 0 usbdevfs /proc/bus/usb usbdevfs rw 0 0 /dev/sda1 /boot ext3 rw 0 0 none /dev/pts devpts rw,gid=5,mode=620 0 0 /dev/sda4 /home ext3 rw 0 0 none /dev/shm tmpfs rw 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0 

Note

The /etc/mtab file is meant to be used to display the status of currently-mounted file systems only. It should not be manually modified.
Each line represents a file system that is currently mounted and contains the following fields (from left to right):
  • The device specification
  • The mount point
  • The file system type
  • Whether the file system is mounted read-only (ro) or read-write (rw), along with any other mount options
  • Two unused fields with zeros in them (for compatibility with /etc/fstab[24])
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.