Linux Commands - List partitions using the fdisk command

by
Jeremy Canfield |
Updated: April 03 2024
| Linux Commands articles
The fdisk command partitions a drive as MBR (master boot record). The gdisk command partitions a drive as GPT (GUID partition table). The parted command can partition a drive as either MBR or GPT. MBR is typically needed for systems with old hardware or software, because GPT is not backwards compatible with old hardware or software. gdisk or parted can be used if the system is using modern hardware and software. GPT is typically used if you need a create a partition greater than 2 TB.
The fdisk --list command can be used to view each parition and type.
~]$ sudo fdisk --list
Disk /dev/nvme0n1: 8 GiB, 8589934592 bytes, 16777216 sectors
Disk model: Amazon Elastic Block Store
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 769B4A8E-3919-4F94-9B10-67529B45C4A0
Device Start End Sectors Size Type
/dev/nvme0n1p1 24576 16777182 16752607 8G Linux filesystem
/dev/nvme0n1p127 22528 24575 2048 1M BIOS boot
/dev/nvme0n1p128 2048 22527 20480 10M EFI System
Partition table entries are not in disk order.
Did you find this article helpful?
If so, consider buying me a coffee over at