• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Understanding the /proc/mounts, /etc/mtab and /proc/partitions files

by admin

Linux provides you with many tools for modifying file systems after applying them to storage devices. In this post, we will learn about many OS configurations file which holds the mount point information.

The /proc/mounts file

The /proc/mounts file lists the status of all currently mounted file systems in a format similar to fstab: the system’s name, mount point, file system type, etc. It is actually not a real file, but part of the virtual file system that represents the status of mounted objects as reported by the Linux kernel. Typically, you’d read this “file” using a command like cat in order to get the details you’re looking for.

Note that /proc/mounts lists all file systems, not just those on storage drives and partitions. It may not be the most readable tool to use in case you’re only looking for drive information.

The mtab file

The /etc/mtab file is very similar to the /proc/mounts file in that it reports the status of currently mounted file systems. However, /proc/mounts is typically more accurate and include more up-to-date information about the file systems.

The /proc/partitions file

The /proc/partitions file contains information about each partition that is currently attached to the system. Like /proc/mounts, it is not a real file but part of the virtual file system. The format of /proc/partitions contains columns, and each column is as follows:

  • major— Represents the class of device so that it can be mapped to an appropriate driver.
  • minor — Separates partitions into physical devices. This corresponds to the number at the end of the partition’s name.
  • #blocks — How many physical blocks the partition takes up.
  • name — The name of the partition.
  • The /proc/partitions file example:

    proc partitions file in Linux

    Filed Under: Linux

    Some more articles you might also be interested in …

    1. How to allow only specific non-root user(s) to use crontab
    2. mktemp: command not found
    3. How to Create a Bridge Interface Using nmcli in CentOS/RHEL 7 and 8
    4. mount: command not found
    5. Beginners Guide to Tuning Profiles in CentOS/RHEL
    6. e2fsck Command Examples in Linux
    7. sudo Command Examples in Linux
    8. CentOS / RHEL 7 : How to set default target (default runlevel)
    9. How to use fdisk to partition a disk in Linux
    10. How to disable avahi-daemon service in CentOS/RHEL

    You May Also Like

    Primary Sidebar

    Recent Posts

    • powertop Command Examples in Linux
    • powertop: command not found
    • powerstat: command not found
    • powerstat Command Examples in Linux

    © 2023 · The Geek Diary

    • Archives
    • Contact Us
    • Copyright