Linux

fdisk

DestructivePartition a disk

fdisk -l / fdisk <device>

-l is read-only. Interactive edits apply on 'w', discard with 'q'. Use parted/gdisk for >2TB GPT.

Examples

  • fdisk -lList all disk layouts

Syntax

fdisk [-l] [device]

Before you run it

Writing with 'w' changes the partition table.

Related commands

Check it once more before you run it

Some commands cannot be undone if one flag is wrong. An on-device reference works with no connection. Free to install, no ads.

Get it free on the App Store