Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access