Skip to main content
  1. Notes/

Diskutil

Diskutil – tool for working with disks and partitions on macOS. Includes options not available in Disk Utility GUI.

# List disks and partitions
diskutil list

# List file systems which can be used for formatting
diskutil listFilesystems

# Erase existing disk
diskutil eraseDisk <filesystem> <new_disk_name> <disk_path>

# Unmount entire disk
diskutil unmountDisk <disk_path>