Disk Utility Tool
Utility to manage local disks and volumes
Most commands require an administrator or root user
WARNING: Most destructive operations are not prompted
Usage: diskutil [quiet] <verb> <options>, where <verb> is as follows:
list (List the partitions of a disk)
info[rmation] (Get information on a specific disk or partition)
listFilesystems (List file systems available for formatting)
activity (Continuous log of system-wide disk arbitration)
u[n]mount (Unmount a single volume)
unmountDisk (Unmount an entire disk (all volumes))
eject (Eject a disk)
mount (Mount a single volume)
mountDisk (Mount an entire disk (all mountable volumes))
enableJournal (Enable HFS+ journaling on a mounted HFS+ volume)
disableJournal (Disable HFS+ journaling on a mounted HFS+ volume)
moveJournal (Move the HFS+ journal onto another volume)
enableOwnership (Exact on-disk User/Group IDs on a mounted volume)
disableOwnership (Ignore on-disk User/Group IDs on a mounted volume)
rename[Volume] (Rename a volume)
verifyVolume (Verify the file system data structures of a volume)
repairVolume (Repair the file system data structures of a volume)
verifyDisk (Verify the components of a partition map of a disk)
repairDisk (Repair the components of a partition map of a disk)
eraseDisk (Erase an existing disk, removing all volumes)
eraseVolume (Erase an existing volume)
reformat (Erase an existing volume with same name and type)
eraseOptical (Erase optical media (CD/RW, DVD/RW, etc.))
zeroDisk (Erase a disk, writing zeros to the media)
randomDisk (Erase a disk, writing random data to the media)
secureErase (Securely erase a disk or freespace on a volume)
partitionDisk ((re)Partition a disk, removing all volumes)
resizeVolume (Resize a volume, increasing or decreasing its size)
splitPartition (Split an existing partition into two or more)
mergePartitions (Combine two or more existing partitions into one)
appleRAID <verb> (Perform additional verbs related to AppleRAID)
coreStorage <verb> (Perform additional verbs related to CoreStorage)
apfs <verb> (Perform additional verbs related to APFS)
diskutil <verb> with no options will provide help on that verb
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 498.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Apple_APFS 248.1 MB disk0s4
5: Apple_Boot Recovery HD 650.0 MB disk0s5
/dev/disk1 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk1
1: Apple_HFS OS X Base System 2.0 GB disk1s1
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk2
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk19