GNU fdisk, lfdisk, gfdisk - manipulate partition tables on a hard drive


   fdisk [options] [device]


   fdisk  is  a  disk  partition manipulation program, which allows you to
   create, destroy, resize, move and copy partitions on a hard drive using
   a  menu-driven interface. It is useful for organising the disk space on
   a new  drive,  reorganising  an  old  drive,  creating  space  for  new
   operating  systems,  and  copying data to new hard disks. For a list of
   the supported partition types, see  the  --list-partition-types  option

   It  comes  in  two variants, gfdisk and lfdisk. Lfdisk aims to resemble
   Linux fdisk 2.12, while gfdisk supports more advanced disk  operations,
   like  resizing  the  filesystem,  moving  and  copying partitions. When
   starting fdisk, the default is to run gfdisk.


   -h, --help
          displays a help message.

   -v, --version
          displays the program's version.

   -L, --linux-fdisk
          turns on Linux fdisk compatibility mode. This  is  the  same  as
          running lfdisk.

   -G, --gnu-fdisk
          turns off Linux fdisk compatibility mode.

   -i, --interactive
          where necessary, prompts for user intervention.

   -p, --script
          never prompts for user intervention.

   -l, --list
          lists  the partition table on the specified device and exits. If
          there is no device specified, lists the partition tables on  all
          detected devices.

   -r, --raw-list
          displays  a hex dump of the partition table of the disk, similar
          to the way Linux fdisk displays the raw data  in  the  partition

   -u, --sector-units
          use sectors, instead of cylinders for a default unit.

   -s, --size=DEVICE
          prints  the  size  of  the partition on DEVICE is printed on the
          standard output.

   -t, --list-partition-types
          displays a list of supported partition types and features.

   The following options are available only to lfdisk.

   -b, --sector-size=SIZE
          Specify the sector size of the disk. Valid values are 512,  1024
          and  2048.  Should  be  used  only on older kernels, which don't
          guess the correct sector size.

   -C, --cylinders=CYLINDERS
          Specify the number of cylinders  of  the  disk.  Currently  does
          nothing, it is left for Linux fdisk compatibility.

   -H, --heads=HEADS
          Specify  the  number of heads of the disk. Reasonable values are
          255 or 16.

   -S, --sectors=SECTORS
          Specify the number of sectors per track. A reasonable  value  is


   Before editing a BSD disklabel, the partition with the disklabel should
   already exist on the disk and be  detected  by  the  OS.  If  you  have
   created  a  BSD-type  partition,  you  need to write the changes to the
   disk. If fdisk fails to notify the OS about the  changes  in  partition
   table,  you  need to restart your computer. As fdisk tries to guess the
   device holding the BSD disklabel, it might fail to edit it at all, even
   if  the OS has detected it. In this case you are adviced to simply open
   the device with fdisk directly. It is possible that it doesn't work  on
   some operating systems.

   Getting  the  size of a partition with -s might fail, if fdisk fails to
   guess the disk device, for the same reasons as with the previous bug.


   mkfs(8), cfdisk(8), parted(8) The fdisk program is fully documented  in
   the info(1) format GNU fdisk User Manual manual.

More Linux Commands

sem_timedwait(3) - lock a semaphore - Linux manual page.....
sem_wait() decrements (locks) the semaphore pointed to by sem. If the semaphores value is greater than zero, then the decrement proceeds, and the function retur

sane-qcam(5) - SANE backend for Connectix QuickCam cameras
The sane-qcam library implements a SANE (Scanner Access Now Easy) backend that provides access Connectix QuickCam cameras. DEVICE NAMES This backend expects dev

use_env.3x(lc) miscellaneous curses utility routines........
The unctrl routine returns a character string which is a printable representation of the character c, ignoring attributes. Control characters are displayed in t

bcopy(3) - copy byte sequence (Library - Linux man page)....
The bcopy() function copies n bytes from src to dest. The result is correct, even when both areas overlap. RETURN VALUE None. ATTRIBUTES Multithreading (see pth

TAP::Parser::SourceHandler::File(3pm) - Stream TAP from a te
This is a raw TAP stored in a file TAP::Parser::SourceHandler - it has 2 jobs: 1. Figure out if the raw source its given is a file containing raw TAP output. Se

smartd(8) - SMART Disk Monitoring Daemon - Linux man page...
[This man page is generated for the Linux version of smartmontools. It does not contain info specific to other platforms.] smartd is a daemon that monitors the

monodocer(1) - ECMA Documentation Format Support (Man Page)
monodocer has been obsoleted by mdoc(1). See the mdoc-update(1) man page. monodocer is a program that creates XML documentation stubs in the ECMA Documentation

glVertex3iv(3gl) - specify a vertex - Linux manual page.....
glVertex commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices. The current color, normal, and texture coordinates are assoc

echochar(3ncurses) - add a character (with attributes) to a
The addch, waddch, mvaddch and mvwaddch routines put the character ch into the given window at its current window position, which is then advanced. They are ana

git-merge-file(1) - Run a three-way file merge (Man Page)...
git merge-file incorporates all changes that lead from the <base-file> to <other-file> into <current-file>. The result ordinarily goes into <current-file>. git

lspcmcia(8) - display extended PCMCIA debugging information
pccardctl is used to monitor and control the state of PCMCIA sockets. If a socket number is specified, the command will be applied to just one socket; otherwise

swat(8) - Samba Web Administration Tool - Linux manual page
This tool is part of the samba(7) suite. swat allows a Samba administrator to configure the complex smb.conf(5) file via a Web browser. In addition, a swat conf

We can't live, work or learn in freedom unless the software we use is free.