What command would be used to list all partitions on a Linux system?

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 command that is used to list all partitions on a Linux system is found at the path /proc/partitions. This file provides a summary of all block devices, including information about the major and minor device numbers, the number of blocks, and the device names, effectively giving you a comprehensive view of the partitions currently configured on the system.

In this context, /proc/partitions reads data directly from the kernel's virtual file system, which represents the system's state in real-time. This makes it a reliable source for identifying all the partitions available on a Linux system.

While other options mention commands related to logical volume management and storage initialization, they do not directly provide a list of partitions. The commands lvcreate and pvcreate pertain to creating logical volumes and initializing physical volumes, and /proc/mounts lists currently mounted file systems rather than showing all partitions on the system. Thus, /proc/partitions is the correct choice for obtaining a complete list of partitions on a Linux machine.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy