nerdexam
CompTIA

LX0-103 · Question #7

Which of the following is correct when talking about mount points?

The correct answer is A. Every existing directory can be used as a mount point.. In Linux, any existing directory, regardless of whether it is empty, can be used as a mount point.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

Question

Which of the following is correct when talking about mount points?

Options

  • AEvery existing directory can be used as a mount point.
  • BOnly empty directories can be used as a mount point.
  • CDirectories need to have the SetUID flag set to be used as a mount point.
  • DFiles within a directory are deleted when the directory is used as a mount point.

How the community answered

(28 responses)
  • A
    93% (26)
  • C
    4% (1)
  • D
    4% (1)

Why each option

In Linux, any existing directory, regardless of whether it is empty, can be used as a mount point.

AEvery existing directory can be used as a mount point.Correct

The Linux kernel imposes no restriction on using a non-empty directory as a mount point; the only requirement is that the path exists and is a directory. When a filesystem is mounted over a non-empty directory, the original contents are temporarily hidden and inaccessible until the filesystem is unmounted, but they are not harmed.

BOnly empty directories can be used as a mount point.

Using an empty directory is best practice to avoid hiding existing files, but it is not a technical requirement enforced by the kernel or mount command.

CDirectories need to have the SetUID flag set to be used as a mount point.

The SetUID permission flag has no relationship to mount point eligibility; it is used to execute files with the owner's privileges.

DFiles within a directory are deleted when the directory is used as a mount point.

Files inside a directory used as a mount point are not deleted; they are simply hidden while another filesystem is mounted over that directory and reappear after unmounting.

Concept tested: Linux mount point directory requirements

Source: https://linux.die.net/man/8/mount

Topics

#mount points#filesystem#directory#mounting

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice