LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fdisk

partition table manipulator

TLDR

List partitions
$ sudo fdisk -l
copy
Start the interactive partition manipulator
$ sudo fdisk [/dev/sdX]
copy

SYNOPSIS

fdisk [-l] [-u] [-s partition] [device]

DESCRIPTION

fdisk is a dialog-driven program for managing partition tables and partitions on storage drives. It supports MBR, GPT, SGI, and Sun partition tables.

PARAMETERS

-l, --list

List partition tables for all devices or specified device
-u, --units
Display units in sectors (default) or cylinders
-s, --getsz partition
Print size of partition in 512-byte sectors
-b, --sector-size size
Specify physical and logical sector size
-c, --compatibility mode
Specify compatibility mode (dos or nondos)
-L, --color
Colorize output
-t, --type type
Specify disk label type (dos, gpt, sgi, sun)

INTERACTIVE COMMANDS

m: Display help menup: Print partition tablen: Create new partitiond: Delete partitiont: Change partition typel: List known partition typesw: Write changes and exitq: Quit without saving changesg: Create new GPT partition tableo: Create new DOS partition table

INSTALL

sudo apt install fdisk
copy
sudo apk add util-linux-misc
copy

CAVEATS

Dangerous: Changes are written when you press 'w'. Double-check before writing. Modern fdisk supports GPT natively. MBR partition tables (not fdisk) are limited to 2TB; use GPT for larger disks.

HISTORY

Part of util-linux package. Based on the original fdisk from Minix and early Linux. One of the oldest Linux disk partitioning tools.

SEE ALSO

parted(8), cfdisk(8), gdisk(8), sfdisk(8), partprobe(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid