LFCS Exam QuestionsBrowse all questions from this exam

LFCS Exam - Question 26


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

Show Answer
Correct Answer: A

A mount point is a directory in a filesystem where an additional filesystem can be accessed. Any existing directory can be used as a mount point, it does not have to be empty or have any special flags set. However, the contents of the mounted filesystem will be visible in that directory and could hide any existing files in the directory, which remain intact and continue to consume space. Options B, C, and D are incorrect because they impose conditions or consequences that do not apply to how mount points function.

Discussion

3 comments
Sign in to comment
0ldmanOption: A
Sep 12, 2021

Disagree with the listed answers. You can't use every directory (doubt very much that trying to use /proc or /dev would work). Files in directories can exist but are hidden if you mount over them. They are still there and consume space)

Funkslinger
Feb 28, 2022

Can and should are different things. You CAN erase your entire filesystem with a short command, but SHOULD you?

BuruguduystunstugudunstuyOption: A
Jan 2, 2023

Option A. Every existing directory can be used as a mount point is correct when talking about mount points. In Linux, a mount point is a directory that is used to access the contents of a filesystem. When you mount a filesystem, it is attached to a mount point and becomes accessible under that directory. Any existing directory can be used as a mount point. It does not have to be empty or have any special flags set. However, it is usually a good idea to use an empty directory as a mount point, because the contents of the mounted filesystem will be visible under that directory and might overwrite or conflict with any existing files. For example: mount /dev/sda1 /mnt This mounts the filesystem that is stored on the device /dev/sda1 at the mount point /mnt.

Buruguduystunstugudunstuy
Jan 2, 2023

Option B: Only empty directories can be used as a mount point is not correct. Any existing directory can be used as a mount point, regardless of whether it is empty or not. Option C: Directories need to have the SetUID flag set to be used as a mount point is not correct. The SetUID flag is used to allow executables to be run with the permissions of their owner, rather than the permissions of the user who is running them. It has nothing to do with mount points. Option D: Files within a directory are deleted when the directory is used as a mount point is not correct. When a filesystem is mounted at a mount point, it becomes accessible under that directory, but the existing files in the directory are not deleted or overwritten. They are still accessible, although they might be hidden by the contents of the mounted filesystem.

EA100Option: B
Jan 21, 2024

Correct Answer: B - Empty directories only: Only empty directories can be used as mount points. This ensures that the contents of the mounted filesystem are not mixed with any existing files or directories.