Breaking News
Home / Sys Admin / Unix / How to list disks information in Linux?

How to list disks information in Linux?

In order to check the disk in the system we can use the List Hardware (lshw) command. So run this command via the terminal, you must be logged as root or sudo to root before you run this command.

root@livrona:~# lshw -class disk
PCI (sysfs) 

  *-cdrom                
       description: DVD-RAM writer
       physical id: 0.0.0
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/dvd
       logical name: /dev/sr0
       capabilities: audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: status=open
  *-disk:0
       description: SCSI Disk
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       size: 100GiB (107GB)
       capabilities: partitioned partitioned:dos
       configuration: signature=0006d1b5
  *-disk:1
       description: SCSI Disk
       physical id: 0.1.0
       bus info: scsi@2:0.1.0
       logical name: /dev/sdb
       size: 100GiB (107GB)
<!>

Syntax

The syntax of the command is as follows

lshw [-html] -class <class name of devices>

Some of the common usage is as follows:

lshw -short
Lists hardware in a compact format

lshw -class disk

Lists all disks  in the system.

lshw -html -class network

Lists all network interfaces in HTML

[pb_builder]

Check Also

How to check if a port is open using Terminal in Unix?

There a couple of ways to find out. 1) Using telnet to find if port …

Leave a Reply