Name

fdisk

Synopsis

fdisk [options] [device]

Description

System administration command. Maintain disk partitions via a menu. fdisk displays information about disk partitions, creates and deletes disk partitions, and changes the active partition. It is possible to assign a different operating system to each of the four partitions, though only one partition is active at any given time. You can also divide a physical partition into several logical partitions. The minimum recommended size for a Linux system partition is 40MB. Normally, device will be /dev/hda, /dev/hdb, /dev/sda, /dev/sdb, /dev/hdc, /dev/hdd, and so on. See also cfdisk.

Options

-l

List partition tables and exit.

-s partition

Display the size of partition, unless it is a DOS partition.

Commands

a

Toggle a bootable flag on current partition.

d

Delete current partition.

l

List all partition types.

m

Main menu.

n

Create a new partition; prompt for more information.

p

Print a list of all partitions and information about each.

q

Quit; do not save.

t

Replace the type of the current partition.

u

Modify the display/entry units, which must be cylinders or sectors.

v

Verify: check for errors; display a summary of the number of unallocated sectors.

w

Save changes; exit.

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.