Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The parted (partition editor) utility reports on and manipulates hard disk partitions. The following example shows how to use parted from the command line. It uses the print command to display information about the partitions on the /dev/sda drive:
$ sudo parted /dev/sda print
Disk geometry for /dev/sda: 0kB - 165GB
Disk label type: msdos
Number Start End Size Type File system Flags
1 32kB 1045MB 1045MB primary ext4 boot
2 1045MB 12GB 10GB primary ext4
3 12GB 22GB 10GB primary ext4
4 22GB 165GB 143GB extended
5 22GB 23GB 1045MB logical linux-swap(v1)
6 23GB 41GB 18GB logical ext4
7 41GB 82GB 41GB logical ext4