PDISK(8)
πΎ PDISK(8) β the Apple partition table editor, bestie edition πβ¨
Okay so real talk: this is the pdisk manual page from section 8 of the System Manager's Manual, and it's genuinely iconic once you get past the manpage accent. It's a menu driven program that partitions your disks using the standard Apple disk partitioning scheme, the one described in "Inside Macintosh: Devices". π
And before anyone asks: no, it does not support the Intel/DOS partitioning scheme that fdisk(8) supports. Different vibe entirely. π
β¨ SYNOPSIS β¨
pdisk [-acdfhilLrv] [--abbr] [--compute_size] [--debug] [--fname]
[--help] [--interactive] [--list] [--logical] [--readonly]
[--version] [device ...]
πΈ DESCRIPTION πΈ
pdisk is a menu driven program which partitions disks using the standard Apple disk partitioning scheme described in "Inside Macintosh: Devices". It does not support the Intel/DOS partitioning scheme supported by fdisk(8).
Here are the supported options, listed with the love and detail they deserve:
-a,--abbrβ abbreviates the partition types shown in the partition list. Short king behaviour π«Ά-c,--compute_sizeβ causespdiskto always ignore the device size listed in the partition table and compute the device size by other means. Trust issues but make it valid β¨-d,--debugβ turns on debugging. Doesn't add that much output, but it does add a new commandxto the editing commands that accesses an eclectic bunch of undocumented functionality. Lowkey mysterious, highkey real π-f,--fnameβ show HFS volume names instead of partition name when available. Names! We love a name reveal π-h,--helpβ prints a short help message. A little snack, not a full meal π-i,--interactiveβ causespdiskto go into an interactive mode similar to the MacOS version of the program. Main character energy fr fr π-l,--listβ if no device argument is given,pdisktries to list partition tables for all available drives. Otherwise,pdisklists the partition tables for the specified devices. Cute and contextual π-L,--logicalβ show partition limits in logical blocks. Default is physical blocks. Yes, lowercase-land uppercase-Lare two completely different things, do not come for me π-r,--readonlyβ preventspdiskfrom writing to the device. Protective queen, no notes π‘οΈ-v,--versionβ prints the version number ofpdisk. Say hi to the version, bestie β
π¦ Editing Partition Tables π¦
An argument which is simply the name of a device indicates that pdisk should edit the partition table of that device.
The current top level editing commands are:
C (create with type also specified)
c create new partition
d delete a partition
h command help
i initialize partition map
n (re)name a partition
P (print ordered by base address)
p print the partition table
q quit editing (don't save changes)
r reorder partition entry in map
s change size of partition map
t change the type of an existing partition
w write the partition table
Note the case-sensitivity, because C and c are siblings, not twins β P orders by base address while p just prints, and q quits without saving π don't say I didn't warn you.
Commands which take arguments prompt for each argument in turn. You can also type any number of the arguments separated by spaces and those prompts will be skipped. The only exception to typeahead are the confirmation prompts on the i and w commands, since if we expect you to confirm the decision, we shouldn't undermine that by allowing you to be precipitate about it. Respect the pause, bestie π«Ά
Partitions are always specified by their number, which is the index of the partition entry in the partition map. Most of the commands will change the index numbers of all partitions after the affected partition. You are advised to print the table as frequently as necessary. Like, constantly. Spam that p. π₯
π§ The c (create new partition) command
The c (create new partition) command is the only one with complicated arguments. Okay so break it down:
- The first argument is the base address (in blocks) of the partition. Besides a raw number, you can also specify a partition number followed by the letter
pto indicate that the first block of the new partition should be the same as the first block of that existing free space partition. - The second argument is the length of the partition in blocks. This can be a raw number, or can be a partition number followed by the letter
pto use the size of that partition, or can be a number followed byk,m, orgto indicate the size in kilobytes, megabytes, or gigabytes respectively. (These are powers of 1024, of course, not powers of 1000.) π the decimal enjoyers are gonna be so mad - The third argument is the name of the partition. This can be a single word without quotes, or a string surrounded by single or double quotes.
π C β the glow-up version
The C command is similar to the c command, with the addition of a partition type argument after the other arguments.
πΈ i β initalize
The i (initalize) command prompts for the size of the device.
π n β name
The n (name) command allows the name of a partition to be changed.
β r β reorder
The r (reorder) command allows the index number of partitions to be changed. The index numbers are constrained to be a contiguous sequence. No gaps, no skipping, no chaos π
π t β change partition type
The t (change partition type) command allows the type of a partition to be changed.
π w β write
The w (write) command writes the partition map out. This is the moment. Commit. Bring it into the world β¨
π SEE ALSO π
fdisk(8), gpt(8), newfs(8) β go read those too, bestie, stay educated π
π HISTORY π
The pdisk utility was originally developed for MkLinux. Origin story! Iconic π§
π«Ά AUTHORS π«Ά
Eryk Vershen β king behaviour, thank you for your service π
π BUGS π
- Some people believe there should really be just one disk partitioning utility. (The discourse never ends. Periodt.)
- Filesystem volume names are out of place in a partition utility. This utility supports HFS volume names, but not volume names of any other filesystem types. It's giving HFS-only exclusivity π
- The
--logicaloption has not been heavily tested. Use it with a little caution ngl π«Ά
Cute sign-off time: this page comes from Debian, dated April 24, 2003, in section 8 of the manual. Old school, still slaying. πππ
π¦ where this page comes from
- nixos 26.05: pdisk 0.10
- nixpkgs unstable: pdisk 0.10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms