LX0-103 · Question #93
What does the command mount -a do?
The correct answer is D. It ensures that all file systems listed with the option auto in /etc/fstab are mounted.. The mount -a command mounts all filesystems in /etc/fstab that carry the auto option (the default), skipping any entry explicitly marked noauto.
Question
What does the command mount -a do?
Options
- AIt ensures that all file systems listed with the option noauto in /etc/fstab are mounted.
- BIt shows all mounted file systems that have been automatically mounted.
- CIt opens an editor with root privileges and loads /etc/fstab for editing.
- DIt ensures that all file systems listed with the option auto in /etc/fstab are mounted.
- EIt ensures that all file systems listed in /etc/fstab are mounted regardless of their options.
How the community answered
(14 responses)- A7% (1)
- C7% (1)
- D86% (12)
Why each option
The `mount -a` command mounts all filesystems in /etc/fstab that carry the `auto` option (the default), skipping any entry explicitly marked `noauto`.
Filesystems marked `noauto` are explicitly excluded from `mount -a` processing, so the command does the opposite of what this choice states.
`mount -a` performs a mount operation and does not display or list currently mounted filesystems.
`mount -a` is not an editor command; editing /etc/fstab requires a text editor such as `vi` or `nano`.
By default, filesystems in /etc/fstab are implicitly assigned the `auto` option unless `noauto` is explicitly set. Running `mount -a` iterates through /etc/fstab and mounts every entry with the `auto` option, making it the standard way to apply fstab changes without rebooting.
Filesystems with the `noauto` option are intentionally skipped by `mount -a`, so the command does not mount all entries regardless of their options.
Concept tested: mount -a behavior with /etc/fstab auto option
Source: https://man7.org/linux/man-pages/man8/mount.8.html
Topics
Community Discussion
No community discussion yet for this question.