Linux Command: Show Mounted Hard Drives Partition

To show mounted hard drive partitions in Linux, you can use the df command. The df command displays the amount of disk space used and available on all file systems, including hard drive partitions.

Here’s an example of how to use the df command:

# Display information about mounted file systems
df -h

In this example, the -h option is used to display the output in “human-readable” format, with sizes shown in kilobytes, megabytes, or gigabytes, depending on the size of the file system.

The output of the df command will show the file system name, the total size of the file system, the amount of space used, the amount of space available, and the use percentage for each mounted partition.

You can also use the lsblk command to show information about the block devices on your system, including hard drive partitions. Here’s an example:

# List block devices and their properties
lsblk

The output of the lsblk command will show the name, size, type, and other properties of each block device on your system, including hard drive partitions.

(adarsus.com)

Leave a Comment