{{Short description|Linux partition editor}} {{refimprove|date=April 2021}}

{{Lowercase title}} <!-- thumb|A screenshot of sfdisk's user interface.|300px --> '''sfdisk''' is a Linux partition editor. In contrast to fdisk and cfdisk, sfdisk is not interactive.<ref>{{Cite web|last=Oy|first=Seravo|date=2019-05-17|title=Partition like a pro with fdisk, sfdisk and cfdisk|url=https://linuxnatives.net/2019/partition-like-a-pro-with-fdisk-sfdisk-and-cfdisk|access-date=2021-06-26|website=Linux-natives|language=en}}</ref> All three programs are written in C and are part of the util-linux package of Linux utility programs.

Since sfdisk is command-driven instead of menu-driven, i.e., it reads input from standard input or from a file, it is generally used for partitioning drives from scripts or used by programs, like e.g. GParted.

The current sfdisk implementation uses the libfdisk library.<ref>[https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/disk-utils/sfdisk.c sfdisk.c in util-linux.git], note the "<code>#include <libfdisk.h></code>"<br>Retrieved on 21 March 2021</ref> sfdisk supports MBR (DOS), GPT, SUN and SGI disk labels, but it no longer provides any functionality for CHS (Cylinder-Head-Sector) addressing since version 2.26.<ref>{{Cite web|title=Ubuntu Manpage: sfdisk - display or manipulate a disk partition table|url=https://manpages.ubuntu.com/manpages/focal/man8/sfdisk.8.html|access-date=2021-06-26|website=manpages.ubuntu.com}}</ref>

==See also== * format * gpart * parted, GParted * diskpart * List of disk partitioning software

==References== {{Reflist}}

==External links== *[https://man.cx/sfdisk(8) Manual] *[http://packages.debian.org/search?searchon=contents&keywords=sfdisk Debian Package] *[http://linux.die.net/man/8/sfdisk/ sfdisk(8) - Linux man page]

{{FLOSS}}

Category: Free partitioning software Category: Linux file system-related software

{{Linux-stub}} {{storage-software-stub}}