nerdexam
CompTIA

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.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

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)
  • A
    7% (1)
  • C
    7% (1)
  • D
    86% (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`.

AIt ensures that all file systems listed with the option noauto in /etc/fstab are mounted.

Filesystems marked `noauto` are explicitly excluded from `mount -a` processing, so the command does the opposite of what this choice states.

BIt shows all mounted file systems that have been automatically mounted.

`mount -a` performs a mount operation and does not display or list currently mounted filesystems.

CIt opens an editor with root privileges and loads /etc/fstab for editing.

`mount -a` is not an editor command; editing /etc/fstab requires a text editor such as `vi` or `nano`.

DIt ensures that all file systems listed with the option auto in /etc/fstab are mounted.Correct

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.

EIt ensures that all file systems listed in /etc/fstab are mounted regardless of their options.

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

#mount#fstab#auto option#filesystem mounting

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice