1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-28 19:19:44 +01:00
tldr/pages/linux/sfdisk.md
Managor a8d8537337
sfdisk: add page (#13665)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
2024-09-11 19:46:20 +02:00

538 B

sfdisk

Display or manipulate a disk partition table. More information: https://manned.org/sfdisk.

  • Back up the partition layout to a file:

sudo sfdisk {{-d|--dump}} {{path/to/device}} > {{path/to/file.dump}}

  • Restore a partition layout:

sudo sfdisk {{path/to/device}} < {{path/to/file.dump}}

  • Set the type of a partition:

sfdisk --part-type {{path/to/device}}} {{partition_number}} {{swap}}

  • Delete a partition:

sfdisk --delete {{path/to/device}} {{partition_number}}

  • Display help:

sfdisk {{-h|--help}}