You are hardening a Linux server that sometimes remounts its root filesystem read-only during maintenance. A health-check script must confirm at runtime that /tmp is really mounted with the noexec flag, even if /etc/mtab is unavailable or out of date. Which single file should the script read to obtain an authoritative, up-to-date list of all mounts and their current options?
The kernel maintains the definitive mount table and exposes it through the pseudo-file /proc/mounts (a symbolic link to /proc/self/mounts on modern kernels). Because the contents are generated on demand by the kernel, the file always shows the mounts that are visible in the calling process's mount namespace, regardless of whether /etc/mtab exists, is stale, or is a symlink. Reading /etc/fstab only shows administrator-configured entries, /proc/partitions lists block devices but not current mount options, and /run/mount/utab is a private runtime database used by libmount (util-linux) to track user-mount metadata-it is not maintained by the kernel and can be missing or stale. Therefore, parsing /proc/mounts is the most reliable way to verify that /tmp-or any filesystem-is currently mounted with the desired flags.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between /proc/mounts and /etc/fstab?
Open an interactive chat with Bash
What is the purpose of the noexec flag in mount options?
Open an interactive chat with Bash
Why is /proc/mounts considered more reliable than /run/mount/utab?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access