2025-03-14 21:59:59 -06:00
|
|
|
# diskutil
|
|
|
|
|
|
|
|
|
|
> Utility to manage local disks and volumes.
|
|
|
|
|
> Some subcommands such as `partitiondisk` have their own usage documentation.
|
|
|
|
|
> More information: <https://keith.github.io/xcode-man-pages/diskutil.8.html>.
|
|
|
|
|
|
|
|
|
|
- List all currently available disks, partitions and mounted volumes:
|
|
|
|
|
|
|
|
|
|
`diskutil list`
|
|
|
|
|
|
|
|
|
|
- Repair the filesystem data structures of a volume:
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`diskutil repairVolume {{/dev/disk}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Unmount a volume:
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`diskutil unmountDisk {{/dev/disk}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Eject a CD/DVD (unmount first):
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`diskutil eject {{/dev/diskX}}`
|