Which file is edited to configure automatic mounting of filesystems at boot?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which file is edited to configure automatic mounting of filesystems at boot?

Explanation:
Configuring automatic mounting at boot is done with the filesystem table, /etc/fstab. This file lists every filesystem you want the system to mount automatically, along with how and where to mount it. Each line specifies the device or identifier (like /dev/sda1 or UUID=...), the directory where it should be mounted, the filesystem type (ext4, xfs, etc.), the mount options (defaults, nosuid, ro, etc.), and two numbers that control file system checks and dumping. When the system boots, the boot process reads /etc/fstab and mounts the listed filesystems. You can also test or apply changes without rebooting by running mount -a, which attempts to mount all entries in the table. If you add a new entry, make sure the mount point exists and the device is available; otherwise the boot or the command can fail for that line. Files like /etc/mtab contain the currently mounted filesystems and aren’t used to configure mounts at boot. /etc/exports is for sharing directories via NFS, not for local boot mounting. Some systems may support fragments in /etc/fstab.d to extend the main table, but the primary file to edit for automatic boot mounting is /etc/fstab.

Configuring automatic mounting at boot is done with the filesystem table, /etc/fstab. This file lists every filesystem you want the system to mount automatically, along with how and where to mount it. Each line specifies the device or identifier (like /dev/sda1 or UUID=...), the directory where it should be mounted, the filesystem type (ext4, xfs, etc.), the mount options (defaults, nosuid, ro, etc.), and two numbers that control file system checks and dumping.

When the system boots, the boot process reads /etc/fstab and mounts the listed filesystems. You can also test or apply changes without rebooting by running mount -a, which attempts to mount all entries in the table. If you add a new entry, make sure the mount point exists and the device is available; otherwise the boot or the command can fail for that line.

Files like /etc/mtab contain the currently mounted filesystems and aren’t used to configure mounts at boot. /etc/exports is for sharing directories via NFS, not for local boot mounting. Some systems may support fragments in /etc/fstab.d to extend the main table, but the primary file to edit for automatic boot mounting is /etc/fstab.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy