nerdexam
CompTIA

LX0-103 · Question #100

How many fields are in a syntactically correct line of /etc/fstab?

The correct answer is D. 6. A valid /etc/fstab entry contains exactly 6 whitespace-separated fields that define the device, mount point, filesystem type, options, dump flag, and fsck pass order.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

Question

How many fields are in a syntactically correct line of /etc/fstab?

Options

  • A3
  • B4
  • C5
  • D6
  • E7

How the community answered

(30 responses)
  • A
    7% (2)
  • C
    3% (1)
  • D
    90% (27)

Why each option

A valid /etc/fstab entry contains exactly 6 whitespace-separated fields that define the device, mount point, filesystem type, options, dump flag, and fsck pass order.

A3

Three fields are insufficient - mount point, filesystem type, options, dump, and pass fields would all be missing or collapsed.

B4

Four fields omit at least the dump flag and the fsck pass order, both of which are required fields in a valid fstab line.

C5

Five fields omit one of the required fields, typically the fsck pass number, making the entry incomplete.

D6Correct

Each line in /etc/fstab consists of six fields in order: (1) the device or UUID to mount, (2) the mount point directory, (3) the filesystem type, (4) mount options such as 'defaults' or 'ro', (5) the dump flag indicating whether the filesystem should be backed up by dump, and (6) the fsck pass number indicating the order in which fsck checks filesystems at boot. All six fields are required for a syntactically correct entry.

E7

Seven fields exceeds the defined fstab format; there is no seventh standard field in the /etc/fstab specification.

Concept tested: /etc/fstab file structure and field count

Source: https://man7.org/linux/man-pages/man5/fstab.5.html

Topics

#fstab#filesystem configuration#mount options#fstab syntax

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice