commands.sh

diskutil

macos

Utility to manage local disks and volumes. Some subcommands such as `partitiondisk` have their own usage documentation.

More info →

Examples (4)

List all currently available disks, partitions, and mounted volumes

Repair the filesystem data structures of a volume

diskutil repairVolume /dev/disk

Unmount a volume

diskutil unmountDisk /dev/disk

Eject a CD/DVD (unmount first)

diskutil eject /dev/diskX
made by @shridhargupta | data from tldr-pages