View Hard Drive Partitions with fdisk and parted

To list the partition tables with fdisk:

sudo fdisk -l

Output:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
Disk identifier: 0x000564f5
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   968386559   484192256   83  Linux
/dev/sda2       968388606   976771071     4191233    5  Extended
/dev/sda5       968388608   976771071     4191232   82  Linux swap / Solaris
 
Disk /dev/mapper/cryptswap1: 4291 MB, 4291821568 bytes
255 heads, 63 sectors/track, 521 cylinders, total 8382464 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
Disk identifier: 0x126562aa

 
 

To list the partition tables with parted:

sudo parted /dev/sda print

Output:

Model: ATA WDC WD5000AAVS-2 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
 
Number  Start   End    Size    Type      File system  Flags
 1      1049kB  496GB  496GB   primary   ext4         boot
 2      496GB   500GB  4292MB  extended
 5      496GB   500GB  4292MB  logical
Categories: Linux, Ubuntu Tags: , , , , ,
%d bloggers like this: