Name
fdisk
Synopsis
fdisk [options
] [device
]
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 possible primary 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
- -b sectorsize
Set the size of individual disk sectors. May be 512, 1024, or 2048. Most systems now recognize sector sizes, so this is not necessary.
- -l
List partition tables and exit.
- -u
Report partition sizes in sectors instead of cylinders.
- -s partition
Display the size of partition, unless it is a DOS partition.
- -v
Print version number, then exit.
Commands
- a
Toggle a bootable flag on current partition.
- b
Edit disklabel of a BSD partition.
- c
Toggle DOS compatibility flag.
- d
Delete current partition.
- l
List all partition types.
- m
Main menu.
- n
Create a new partition; prompt for more information.
- o
Create an empty DOS partition table.
- 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 ...
Get Linux in a Nutshell, Fourth 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.