A few ways to list disk information in Linux Mint.

There are a few ways in Linux Mint to view disk information. The Disks utility found at Preferences->Hardware-Disks allows the viewing of hard disk information.

Linux Mint Disks utility.
Linux Mint Disks utility.

This displays all of the partitions and their types on a selected physical disk. There are options for unmounting partitions, deleting a partition and even more options such as formatting and editing the mount options. There are even options for creating an image of the partition and restoring it. Very good for backups.

Disk utility options.
Disk utility options.

Another way is with the terminal. The fdisk utility will list all of the disk partitions.

jason@jason-virtual-machine ~ $ sudo fdisk -l /dev/sda
[sudo] password for jason: 
Disk /dev/sda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8f4a6053
 
Device     Boot     Start       End   Sectors Size Id Type
/dev/sda1  *         2048 117440511 117438464  56G 83 Linux
/dev/sda2       117442558 125827071   8384514   4G  5 Extended
/dev/sda5       117442560 125827071   8384512   4G 82 Linux swap / Solaris

use the sudo lsblk command to view a list of block devices in your Linux machine.

jason@jason-virtual-machine ~ $ sudo lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   60G  0 disk 
├─sda1   8:1    0   56G  0 part /
├─sda2   8:2    0    1K  0 part 
└─sda5   8:5    0    4G  0 part [SWAP]
sr0     11:0    1  5.7G  0 rom  /media/jason/300

This another way, just listing the /dev directory containing all of the disks.

jason@jason-virtual-machine ~ $ ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root  9 Jul 13 21:09 pci-0000:02:04.0-ata-2 -> ../../sr0
lrwxrwxrwx 1 root root  9 Jul 13 21:09 pci-0000:03:00.0-sas-phy0-lun-0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 13 21:09 pci-0000:03:00.0-sas-phy0-lun-0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 13 21:09 pci-0000:03:00.0-sas-phy0-lun-0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 13 21:09 pci-0000:03:00.0-sas-phy0-lun-0-part5 -> ../../sda5

The lshw command will also list all installed physical drives.

jason@jason-virtual-machine ~ $ sudo lshw -class disk
[sudo] password for jason: 
  *-disk                  
       description: SCSI Disk
       physical id: 0.0.0
       bus info: scsi@32:0.0.0
       logical name: /dev/sda
       size: 60GiB (64GB)
       capabilities: partitioned partitioned:dos
       configuration: logicalsectorsize=512 sectorsize=512 signature=8f4a6053
  *-cdrom
       description: DVD-RAM writer
       physical id: 0.0.0
       bus info: scsi@3:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/dvd
       logical name: /dev/dvdrw
       logical name: /dev/sr0
       logical name: /media/jason/300
       capabilities: audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: mount.fstype=udf mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8 state=mounted status=ready

No comments have been made. Use this form to start the conversation :)

Leave a Reply