Manjaro Linux

How to list disk devices on Manjaro Linux

In a computing device, disk drives are the components used to store, read or write data. The most common example of a disk drive is an HDD(Hard Disk Drive) that is usually placed inside the PC. However, a disk drive can be used externally by keeping it in an external box.

Linux users usually look for the disk devices attached to the system to get information like the number of storage devices attached, the amount of space available on each disk device. In this post, we are listing various methods that assist to list down the available disk drives on Manjaro Linux.

How to list disk devices in Manjaro

This section lists the possible ways to get the list of available disk devices on your Manjaro system. To list disk devices, users have two possibilities:

– Using the Graphical UI support of Manjaro

– Using the Command Line support of Manjaro

The upcoming sections contain an explanation of both methods.

How to list disk devices on Manjaro using GUI

To get the list of disk devices using the graphical interface of Manjaro, you must perform the following steps.

Step 1 : Navigate to the “Show Applications” icon placed on “dock” and then click on “Accessories“.

Graphical user interface, application Description automatically generated

Step 2 : After getting the list of applications inside accessories, go to “Disks“.

A screenshot of a cell phone Description automatically generated with medium confidence

Step 3 : It is noticed that the attached devices are shown as highlighted in the image below. And navigating to any device will show you the information related to that device only.

Graphical user interface, text Description automatically generated

How to list disk devices on Manjaro using Command Line

The command-line accessibility of Manjaro requires several commands to perform any action. The commands supported by Manjaro to list disk devices are described here.

Using lsblk command

The first and foremost command to list down the disk devices is lsblk. This command lists down the devices that are currently associated with your machine. The output of the command shows the attached disk(s) and the associated partitions.

Moreover, there are several columns that contain the following information for you.

– MAJ:MIN : This column contains the identifier that a kernel uses for each device according to the type of disk device.

– RM : By following this column, you will get to know about the removable status of each device. The numbers 1 and 0 stand for Yes and No respectively. This means if a device has a value 1 then it is removable.

– SIZE : Displays the storage space of each disk device and partition.

– RO : Stands for Read-Only and if a device has a value of 0 then it means it is not read-only. And value 1 shows that the device has only read rights.

– TYPE : This column shows the type of each device; either it is a disk, a partition, or a rom.

– MOUNTPOINTS : Shows the mountpoint(s) of each device. The mount point directs towards the locations where the data is being stored inside each device.

$ lsblk

Graphical user interface, text, application Description automatically generated

The lsblk command does support several options that can be used to get more information about your disk devices. For instance, the -f option of lsblk command lists down the filesystems of each device.

$ lsblk -f

Text Description automatically generated

Using lshw command

The lshw command lists down the name of devices and some basic information about each device. This command can be executed to get the information about a specific disk.

The command written below will list down the disk devices with some relevant information.

$ sudo lshw -class disk

Text Description automatically generated

Text Description automatically generated

Using fdisk command

The fdisk command can be used as an alternative to lsblk command as it also shows the disk devices and partitions on your system. To get the disk devices, the fdisk command is executed with -l option as shown below.

$ sudo fdisk -l

Text Description automatically generated

Using hwinfo command

The hwinfo command in Linux can be executed to get the information about hardware components attached to your machine. The hwinfo command has several options that point towards a specific hardware component. For instance, the command written below exercises the use of “–disk” option with the hwinfo command to list down all the disk devices on your Manjaro system.

$ sudo hwinfo --disk

Text Description automatically generated

The output of the above command looks messy but it contains detailed information about the disk device(s). You can get limited information by using the “–short” flag with the above-mentioned command. The following command is executed to get a short and clean output.

$ sudo hwinfo --disk --short

Graphical user interface, text, website Description automatically generated

Using df command

The df command in Linux can also be exercised to get information about the disk devices. It supports a long list of options that extend its functionality. The df command without any options returns the following output,

$ df

The output shown above displays the list of disk devices and the several options related to storage, like Size, Used, Available, percentage usage, and mount location. There are several options like -H, -T, to get the output in human readable format and to print the type of file systems as well.

Conclusion

System administrators usually have to perform operations related to disk devices. For instance, listing down the disk devices can provide several fruitful information such as the number of devices attached, space occupied by each disk device. In this article, you have come to know about listing disk devices in Manjaro Linux using two methods. The graphical method seems easy to perform, however, a Linux lover will surely go for terminal support. It is to notice that disk devices his post is not for system admins only, but a routine Linux user can also learn these commands to get some information about disk devices.

About the author

Adnan Shabbir