In Linux, which folder contains directories for each mounted drive?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The correct answer points to the location where device files representing each block device on the system are found, specifically under the /sys filesystem. The /sys/block directory contains a subdirectory for each block device that has been detected by the system. These directories correspond to physical disk drives and other storage devices. This structure allows the Linux kernel and users to interact with the hardware at a low level.

Devices listed in /sys/block typically represent mounted drives or partitions that are available to the operating system. By examining these directories, users can gather important information about each block device, such as its size, operational status, and other detailed attributes.

The other options serve different purposes. For instance, /etc/mtab contains a list of currently mounted filesystems, but it does not directly contain directories for mounted drives. /proc/partitions provides information on the partitions in a human-readable format, but it doesn’t have directories for each mounted drive. The /dev/mapper directory is concerned with device-mapper entries related to logical volume management rather than the actual mounted drives themselves. Each of these other folders is important and useful, but they do not serve the specific function of containing directories for each mounted drive in the way that /sys/block does.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy