Howtos / Articles

List all hard disks connected to a Ubuntu system

You often need to know what physical drives are attached to a system, how many drives are connected, or even what device names match up with which physical drive. Ubuntu comes with a handy tool called ‘lshw’ which is used to extract detailed information on the hardware in the PC.

To view a listing of all disks in the system:

$ sudo lshw -class disk -short

This will list all disks and storage devices. This includes DVD drives, USB card readers, etc.

Example output:

$ sudo lshw -class disk -short
H/W path             Device       Class      Description
/0/100/7.1/0.0.0     /dev/cdrom2  disk       DVD-RAM writer
/0/100/10/0.0.0      /dev/sda     disk       250GB WDC WD2500SD-01K
/0/1/0.0.0           /dev/sdb     disk       2TB SCSI Disk

Share this howto article!
  • Facebook
  • Twitter
  • Reddit
  • email

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>