sfdisk
Verified for current stable LTS
Sfdisk Command: Set Partition Type
Use for set partition type with Sfdisk. Exact CLI syntax to set partition type using Sfdisk.
When to use this: Use for set partition type with Sfdisk.
Command Syntax
sudo sfdisk --part-type </dev/sdX> <partition_number> <swap> sudo sfdisk --part-type </dev/sdX> <partition_number> <swap> Live Command Builder
Final Command
sudo sfdisk --part-type </dev/sdX> <partition_number> <swap> Command Breakdown
--part-type- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to set partition type using Sfdisk.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Sfdisk Command: Backup Partition Layout To File
sudo sfdisk -d </dev/sdX> > <path/to/file.dump> Sfdisk Command: Delete Partition sudo sfdisk --delete </dev/sdX> <partition_number> Sfdisk Command: Display Help sfdisk -h Sfdisk Command: Restore Partition Layout From File sudo sfdisk < <path/to/file.dump> </dev/sdX>