Docsity

CompTIA Linux+ Chapter 3- Exploring Linux Filesystems 2026.2027.pdf, Exams of Computer Applications

Toggle sidebar
bg1
CompTIA Linux+ Chapter 3: Exploring Linux Filesystems 2026/2027 | Original Practice Questions, Answers and Detailed Rationales | Filesystem Hierarchy, Directory Structure, File Types, Mounting, Disk Management, Permissions, Storage Administration and Filesystem Troubleshooting | Professional Certification Exam Preparation GuideSECTION 1: Filesystem Hierarchy Standard (FHS) and Directory Structure (Questions 1–25)Question 1Which directory in the FHS is intended for essential command binaries that must be available to all users, including in single-user mode?A. /usr/binB. /binC. /sbinD. /optCorrect Answer: B
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download CompTIA Linux+ Chapter 3- Exploring Linux Filesystems 2026.2027.pdf and more Exams Computer Applications in PDF only on Docsity!

CompTIA Linux+ Chapter 3: Exploring Linux

Filesystems 2026/2027 | Original Practice

Questions, Answers and Detailed Rationales |

Filesystem Hierarchy, Directory Structure, File

Types, Mounting, Disk Management, Permissions,

Storage Administration and Filesystem

Troubleshooting | Professional Certification Exam

Preparation Guide

SECTION 1: Filesystem Hierarchy Standard (FHS) and Directory Structure (Questions 1–25)

Question 1

Which directory in the FHS is intended for essential command binaries that must be available to all users, including in single-user mode?

A. /usr/bin

B. /bin

C. /sbin

D. /opt

Correct Answer: B

Explanation: /bin holds essential user command binaries required for booting and basic operation; /usr/bin holds non-essential user commands.

Question 2

A Linux administrator needs to place a third-party application suite that does not follow standard system packaging. Which FHS directory is most appropriate?

A. /usr/local

B. /opt

C. /srv

D. /var/lib

Correct Answer: B

Explanation: /opt is reserved for add-on application packages, each typically in its own subdirectory; /usr/local is for locally compiled software.

Question 3

Which directory contains host-specific system configuration files and must not contain binary executables?

A. /etc

B. /var

C. /usr

D. /boot

Correct Answer: A

Explanation: /etc is designated for static, host-specific configuration; placing binaries there violates FHS separation principles.

A. Separation of shareable static files from variable files

B. Isolation of kernel modules from user binaries

C. Restriction of root access to system directories

D. Mandatory encryption of application data

Correct Answer: A

Explanation: FHS isolates variable data in /var so that /usr, containing static shareable files, can be mounted read-only.

Question 7

Which directory typically contains device files representing hardware?

A. /dev

B. /proc

C. /sys

D. /mnt

Correct Answer: A

Explanation: /dev holds device special files; /proc and /sys are virtual filesystems exposing kernel and hardware information.

Question 8

A junior administrator attempts to store application binaries in /etc. Why is this considered poor practice?

A. /etc is mounted read-only by default

B. /etc is reserved for configuration files, and mixing binaries complicates backup and security auditing

C. /etc has no execute permission for root

D. /etc is cleared at every boot

Correct Answer: B

Explanation: FHS reserves /etc for configuration; placing binaries there violates separation of static configuration from executable content.

Question 9

Which directory is the standard mount point for removable media such as USB drives and CD-ROMs?

A. /mnt

B. /media

C. /run

D. /tmp

Correct Answer: B

Explanation: /media holds mount points for removable media; /mnt is for temporary manual mounts by administrators.

Question 10

What does the root filesystem / contain according to FHS?

A. Only user home directories

B. The essential components needed to boot, restore, recover, and repair the system

C. All application-specific data and logs

D. Only third-party add-on packages

Correct Answer: B

A. /proc

B. /dev

C. /sys

D. /run

Correct Answer: A

Explanation: /proc is a pseudo-filesystem providing process and kernel information; /sys exposes device and driver information.

Question 14

Where should a package maintainer place architecture-independent shared data such as documentation and locale files?

A. /usr/share

B. /usr/lib

C. /usr/include

D. /usr/local

Correct Answer: A

Explanation: /usr/share holds architecture-independent shared data, including documentation and locale information.

Question 15

Which directory is intended for temporary files that may be cleared at boot?

A. /var/tmp

B. /tmp

C. /run

D. /scratch

Correct Answer: B

Explanation: /tmp is for temporary files and may be cleared at boot; /var/tmp persists longer across reboots.

Question 16

An administrator discovers that /home is on a separate partition. What is the primary operational benefit of this layout?

A. It allows user data to persist across OS reinstallations and isolates user disk usage

B. It speeds up kernel compilation

C. It enables read-only mounting of /etc

D. It eliminates the need for backups

Correct Answer: A

Explanation: A separate /home preserves user data during system reinstalls and contains user disk consumption separately.

Question 17

Which FHS directory holds shared libraries required by binaries in /bin and /sbin?

A. /usr/lib

B. /lib

C. /opt/lib

D. /usr/local/lib

Correct Answer: B

Question 20

Why does FHS separate /bin and /sbin?

A. /sbin binaries are only for non-root users

B. /sbin contains system administration binaries typically used by root, while /bin contains general user commands

C. /bin is encrypted and /sbin is not

D. /sbin is mounted from network storage

Correct Answer: B

Explanation: /sbin holds system administration executables, while /bin holds essential commands available to all users.

Question 21

An auditor finds application log files stored in /usr/logs. Which principle does this violate?

A. Separation of static shareable files from variable data

B. Principle of least privilege

C. Mandatory access control

D. Kernel module signing

Correct Answer: A

Explanation: Logs are variable data and belong under /var/log; storing them in /usr violates the static/variable separation.

Question 22

Which directory is the mount point for a temporary filesystem that stores runtime data such as PID files and sockets?

A. /run

B. /tmp

C. /var/run

D. /dev/shm

Correct Answer: A

Explanation: /run is a tmpfs for runtime variable data; many distributions symlink /var/run to /run.

Question 23

A user runs cd ~ from any directory. What does ~ represent?

A. The root directory

B. The previous working directory

C. The current user’s home directory

D. The system-wide temporary directory

Correct Answer: C

Explanation: The tilde metacharacter expands to the current user’s home directory path.

Question 24

Which of the following is an absolute pathname?

A. docs/report.txt

B. ../bin/script.sh

C. /var/log/syslog

D. ~/projects

Question 27

A user is in /var/log and runs cd ../../etc. Which directory does the user enter?

A. /etc

B. /var/etc

C. /etc/var

D. /var/log/etc

Correct Answer: A

Explanation: ../.. moves up two levels to /, then etc enters /etc.

Question 28

Which command changes the working directory to the previous directory?

A. cd ..

B. cd -

C. cd ~

D. cd /

Correct Answer: B

Explanation: cd - switches to the previous working directory and prints its path.

Question 29

What is the effect of the command cd with no arguments?

A. It changes to the root directory

B. It changes to the current user’s home directory

C. It prints the current directory

D. It returns an error

Correct Answer: B

Explanation: cd without arguments defaults to the user’s home directory, equivalent to cd ~.

Question 30

Which pathname is relative?

A. /usr/local/bin

B. ./scripts/start.sh

C. /etc/fstab

D. ~/Documents

Correct Answer: B

Explanation: A relative pathname does not begin with / and is interpreted from the current working directory.

Question 31

A user in /home/alice runs cd ../bob/docs. What is the resulting working directory?

A. /home/bob/docs

B. /home/alice/bob/docs

C. /bob/docs

D. /home/docs

Correct Answer: A

Explanation: From /home/alice, .. goes to /home, then bob/docs yields /home/bob/docs.

D. The user’s home directory

Correct Answer: B

Explanation: .. is a hard link to the parent directory;. refers to the directory itself.

Question 35

Which command displays a directory tree in a hierarchical format?

A. tree

B. ls -R

C. find.

D. du -a

Correct Answer: A

Explanation: tree recursively displays directories and files in a visual hierarchy.

Question 36

An administrator wants to list only directories in the current location, not their contents. Which command is most appropriate?

A. ls -d */

B. ls -l

C. ls -a

D. ls -R

Correct Answer: A

Explanation: ls -d */ lists directory entries themselves rather than expanding their contents.

Question 37

What is the purpose of Bash tab completion when navigating filesystems?

A. It encrypts filenames

B. It automatically completes partially typed pathnames and reduces typing errors

C. It mounts filesystems automatically

D. It changes file permissions

Correct Answer: B

Explanation: Tab completion expands unique pathname prefixes and helps avoid typographical errors.

Question 38

A user runs cd /var/log && cd ../spool. Where is the user now?

A. /var/spool

B. /var/log/spool

C. /spool

D. /var/log/../spool is invalid

Correct Answer: A

Explanation: From /var/log, .. moves to /var, and spool enters /var/spool.

Question 39

Which command reports the file type of /dev/sda without opening it as text?

A. cat /dev/sda

B. file /dev/sda

Explanation: l denotes a symbolic link; the link target is shown after ->.

Question 42

Which of the following is NOT stored in an inode?

A. File size

B. File permissions

C. Filename

D. Link count

Correct Answer: C

Explanation: Filenames are stored in directory entries, not in inodes; inodes store metadata and data pointers.

Question 43

A file has a link count of 3. What does this mean?

A. Three processes have the file open

B. Three hard links reference the same inode

C. The file has three symbolic links

D. The file has three ACL entries

Correct Answer: B

Explanation: The inode link count tracks the number of directory entries (hard links) referencing that inode.

Question 44

Which command displays detailed inode metadata for a file, including timestamps and block count?

A. ls -l

B. stat

C. file

D. du

Correct Answer: B

Explanation: stat shows inode metadata such as size, blocks, inode number, and atime/mtime/ctime.

Question 45

What happens to a file’s data when its last hard link is removed and no process has it open?

A. The data remains indefinitely

B. The inode and data blocks are reclaimed by the filesystem

C. The file becomes a symbolic link

D. The file is moved to /tmp

Correct Answer: B

Explanation: When the link count reaches zero and no open file descriptors remain, the inode and data blocks are freed.

Question 46

Which file type is a character device?

A. A file representing a serial port

B. A regular text file

C. A directory