Ubuntu – How to view all available HDD’s/partitions

filesystem

I found a 6 GB IDE HDD in my basement. I want to plug it in and see what might be on it. The drive seems to be recognized in BIOS.

I can't find it in Ubuntu to view files, and Ubuntu is the only OS on that particular computer. I was wondering if Ubuntu has an equivalent to the Windows feature "My Computer", which lists all available drives/storage devices. Typically, My Computer shows C:, which can be opened to view all of your directories and files. At this point, it is very similar to Ubuntu's Home Folder.

How to view/select all available partitions of that drive or all available HDD's without formatting or tampering with the contents in any way?

Best Answer

There are many ways but my favorite is lsblk. Here is a demonstration:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

That would show the following:

NAME   FSTYPE   SIZE MOUNTPOINT LABEL
sda           111.8G            
├─sda1 swap     121M [SWAP]     
└─sda2 ext4   111.7G /          
sdb             2.7T            
└─sdb1 ext4     2.7T            xtreme
sdc             3.7T            
└─sdc1 ext4     3.7T            titan

It is showing:

  • The name of the drive and the partitions it has.
  • The type of file system.
  • The size the whole drive has and the size each partition has.
  • The mount point and if available, the label for them.

You can play around with the options by first looking at the ones available with lsblk --help. I like lsblk because of the friendly way of showing the information if compared for example with fdisk or parted.