4 ways to view all drives (mounted and unmounted) under Linux

s2 0

The drives on each system can either be mounted or not. The mounted drives can be accessed at any time, while the data on the unmounted drives can only be accessed after these drives have been mounted. In the following section of this article, we would like to introduce you to the different methods of displaying all available drives in Linux.

Show all drives under Linux

To view all of your drives on a Linux system, you can do one of the following four methods:

Method # 1: Using the “fdisk” Command

The “fdisk” command can be used to display the drives under Linux as follows:

$ sudo fdisk -l

The output produced by this command is shown in the following figure:

Method # 2: Using the “blkid” Command:

The “blkid” command can be used to display available drives in Linux as follows:

$ sudo blkid

Use the blkid command

The output produced by this command is shown in the following figure:

List of drives from the blkid command

Method # 3: Using the lsblk command:

The “lsblk” command can be used to display the system drives under Linux as follows:

$ lsblk

lsblk command

The output produced by this command is shown in the following figure:advertising

Result of the lsbls command

Method # 4: Using the Parted Command:

The “parted” command can be used to display the hard drive partitions in Linux as follows:

$ sudo parted -l

Shared command

The output produced by this command is shown in the following figure:

List of drives as indicated by the parted command

diploma

By choosing one of the four methods described in this article, you can easily find out all the mounted and unmounted drives on your Ubuntu system. Once you have this information, you can mount a drive from it at any time if you want to access its contents.

4 ways to view all drives (mounted and unmounted) under Linux
Tags: