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>

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

Back to Sfdisk directory