-bash-3.2# diskutil Disk Utility Tool Utility to manage local disks and volumes Most options require root access to the device Usage: diskutil [quiet] , where 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 (Treat as exact User/Group IDs for a mounted volume) disableOwnership (Ignore on-disk User/Group IDs for 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) verifyPermissions (Verify the permissions of a Mac OS X volume) repairPermissions (Repair the permissions of a Mac OS X volume) 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 (Perform additional verbs related to AppleRAID) coreStorage (Perform additional verbs related to CoreStorage) diskutil with no options will provide help on that verb -bash-3.2# diskutil lost diskutil: did not recognize verb "lost"; type "diskutil" for a list -bash-3.2# diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Machintosh HD 121.0 GB disk0s2 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *1.3 GB disk1 1: Apple_partition_map 30.7 KB disk1s1 2: Apple_HFS OS X Base System 1.3 GB disk1s2 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk2 /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk3 /dev/disk4 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk4 /dev/disk5 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk5 /dev/disk6 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk6 /dev/disk7 #: TYPE NAME SIZE IDENTIFIER 0: untitled *6.3 MB disk7 /dev/disk8 #: TYPE NAME SIZE IDENTIFIER 0: untitled *2.1 MB disk8 /dev/disk9 #: TYPE NAME SIZE IDENTIFIER 0: untitled *1.0 MB disk9 /dev/disk10 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk10 /dev/disk11 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk11 /dev/disk12 #: TYPE NAME SIZE IDENTIFIER 0: untitled *1.0 MB disk12 -bash-3.2# diskutil eject disk12 Disk disk12 ejected -bash-3.2# diskutil eject disk11 Disk disk11 ejected -bash-3.2# diskutil eject disk10 Disk disk10 ejected -bash-3.2# diskutil eject disk9 Disk disk9 ejected -bash-3.2# diskutil eject disk8 Disk disk8 ejected -bash-3.2# diskutil eject disk7 Volume failed to eject -bash-3.2# diskutil eject disk6 Volume failed to eject -bash-3.2# diskutil eject disk5 Disk disk5 ejected -bash-3.2# diskutil eject disk4 Volume failed to eject -bash-3.2# diskutil eject disk3 Volume failed to eject -bash-3.2# diskutil eject disk2 Volume failed to eject -bash-3.2# diskutil eject disk1 Volume failed to eject -bash-3.2# diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Machintosh HD 121.0 GB disk0s2 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *1.3 GB disk1 1: Apple_partition_map 30.7 KB disk1s1 2: Apple_HFS OS X Base System 1.3 GB disk1s2 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk2 /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk3 /dev/disk4 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk4 /dev/disk6 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk6 /dev/disk7 #: TYPE NAME SIZE IDENTIFIER 0: untitled *6.3 MB disk7 -bash-3.2# diskutil unmountDisk disk7 Unmount of disk7 failed: at least one volume could not be unmounted -bash-3.2# diskutil unmountDisk disk6 Unmount of disk6 failed: at least one volume could not be unmounted -bash-3.2# diskutil unmountDisk disk4 Unmount of disk4 failed: at least one volume could not be unmounted -bash-3.2# diskutil unmountDisk disk3 Unmount of disk3 failed: at least one volume could not be unmounted -bash-3.2# diskutil unmountDisk disk2 Unmount of disk2 failed: at least one volume could not be unmounted -bash-3.2# diskutil unmountDisk disk1 Unmount of disk1 failed: at least one volume could not be unmounted -bash-3.2# diskutil umount disk7 Volume untitled on disk7 failed to unmount -bash-3.2# diskutil umount disk6 Volume untitled on disk6 failed to unmount -bash-3.2# diskutil umount disk4 Volume untitled on disk4 failed to unmount -bash-3.2# diskutil umount disk3 Volume untitled on disk3 failed to unmount -bash-3.2# diskutil umount disk2 Volume untitled on disk2 failed to unmount -bash-3.2# diskutil umount disk1 disk1 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead -bash-3.2# diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Machintosh HD 121.0 GB disk0s2 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *1.3 GB disk1 1: Apple_partition_map 30.7 KB disk1s1 2: Apple_HFS OS X Base System 1.3 GB disk1s2 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk2 /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk3 /dev/disk4 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk4 /dev/disk6 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk6 /dev/disk7 #: TYPE NAME SIZE IDENTIFIER 0: untitled *6.3 MB disk7 -bash-3.2# diskutil cs list No CoreStorage logical volume groups found -bash-3.2# fdisk /dev/disk7 fdisk: /dev/disk7: Resource busy -bash-3.2# fdisk /dev/disk6 fdisk: /dev/disk6: Resource busy -bash-3.2# fdisk /dev/disk4 fdisk: /dev/disk4: Resource busy -bash-3.2# fdisk /dev/disk3 fdisk: /dev/disk3: Resource busy -bash-3.2# fdisk /dev/disk2 fdisk: /dev/disk2: Resource busy -bash-3.2# fdisk /dev/disk1 Disk: /dev/disk1 geometry: 620/64/63 [2502188 sectors] Signature: 0x0 Starting Ending #: id cyl hd sec - cyl hd sec [ start - size] ------------------------------------------------------------------------ 1: 00 0 0 0 - 0 0 0 [ 0 - 0] unused 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused 3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused -bash-3.2# gpt -vv -r show /dev/disk0 gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176 gpt show: /dev/disk0: PMBR at sector 0 gpt show: /dev/disk0: Pri GPT at sector 1 gpt show: /dev/disk0: Sec GPT at sector 236978175 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 236306352 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC 236715992 262151 236978143 32 Sec GPT table 236978175 1 Sec GPT header -bash-3.2# gpt -vv -r show /dev/disk1 gpt show: /dev/disk1: mediasize=1281120256; sectorsize=512; blocks=2502188 gpt show: /dev/disk1: MBR not found at sector 0 start size index contents 0 2502188 -bash-3.2# gpt -vv -r show /dev/disk2 gpt show: unable to open device '/dev/disk2': Resource busy -bash-3.2# gpt -vv -r show /dev/disk3 gpt show: unable to open device '/dev/disk3': Resource busy -bash-3.2# gpt -vv -r show /dev/disk4 gpt show: unable to open device '/dev/disk4': Resource busy -bash-3.2# gpt -vv -r show /dev/disk6 gpt show: unable to open device '/dev/disk6': Resource busy -bash-3.2# gpt -vv -r show /dev/disk7 gpt show: unable to open device '/dev/disk7': Resource busy -bash-3.2# dikutil list -bash: dikutil: command not found -bash-3.2# diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Machintosh HD 121.0 GB disk0s2 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *1.3 GB disk1 1: Apple_partition_map 30.7 KB disk1s1 2: Apple_HFS OS X Base System 1.3 GB disk1s2 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk2 /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk3 /dev/disk4 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk4 /dev/disk5 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *123.1 GB disk5 1: Windows_FAT_32 KADRI2022 123.1 GB disk5s1 /dev/disk6 #: TYPE NAME SIZE IDENTIFIER 0: untitled *524.3 KB disk6 /dev/disk7 #: TYPE NAME SIZE IDENTIFIER 0: untitled *6.3 MB disk7 -bash-3.2# diskutil info disk0 Device Identifier: disk0 Device Node: /dev/disk0 Part of Whole: disk0 Device / Media Name: APPLE SSD SD0128F Media Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): GUID_partition_scheme OS Can Be Installed: No Media Type: Generic Protocol: PCI SMART Status: Verified Total Size: 121.3 GB (121332826112 Bytes) (exactly 236978176 512-Byte-Units) Volume Free Space: Not applicable (no file system) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: Not applicable (no file system) Ejectable: No Whole: Yes Internal: Yes Solid State: Yes OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk1 Device Identifier: disk1 Device Node: /dev/disk1 Part of Whole: disk1 Device / Media Name: Apple disk image Media Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): Apple_partition_scheme OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Total Size: 1.3 GB (1281120256 Bytes) (exactly 2502188 512-Byte-Units) Volume Free Space: Not applicable (no file system) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: Not applicable (no file system) Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk2 Device Identifier: disk2 Device Node: /dev/disk2 Part of Whole: disk2 Device / Media Name: Apple disk image Media Volume Name: untitled Escaped with Unicode: untitled Mounted: Yes Mount Point: /Volumes Escaped with Unicode: /Volumes File System Personality: HFS+ Type (Bundle): hfs Name (User Visible): Mac OS Extended Owners: Enabled Content (IOContent): None OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Volume UUID: CF589F40-6376-39BB-B9B3-52EA50AF2DCC System Image: Yes Total Size: 524.3 KB (524288 Bytes) (exactly 1024 512-Byte-Units) Volume Free Space: 376.8 KB (376832 Bytes) (exactly 736 512-Byte-Units) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: No Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk3 Device Identifier: disk3 Device Node: /dev/disk3 Part of Whole: disk3 Device / Media Name: Apple disk image Media Volume Name: untitled Escaped with Unicode: untitled Mounted: Yes Mount Point: /private/var/tmp Escaped with Unicode: /private/var/tmp File System Personality: HFS+ Type (Bundle): hfs Name (User Visible): Mac OS Extended Owners: Enabled Content (IOContent): None OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Volume UUID: 0EFE9D83-A997-3B7A-80E4-ED57214CB3CF System Image: Yes Total Size: 524.3 KB (524288 Bytes) (exactly 1024 512-Byte-Units) Volume Free Space: 380.9 KB (380928 Bytes) (exactly 744 512-Byte-Units) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: No Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk4 Device Identifier: disk4 Device Node: /dev/disk4 Part of Whole: disk4 Device / Media Name: Apple disk image Media Volume Name: untitled Escaped with Unicode: untitled Mounted: Yes Mount Point: /private/var/run Escaped with Unicode: /private/var/run File System Personality: HFS+ Type (Bundle): hfs Name (User Visible): Mac OS Extended Owners: Enabled Content (IOContent): None OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Volume UUID: 97D07CA7-DF11-3136-A5F5-C22BCFCDC2BE System Image: Yes Total Size: 524.3 KB (524288 Bytes) (exactly 1024 512-Byte-Units) Volume Free Space: 368.6 KB (368640 Bytes) (exactly 720 512-Byte-Units) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: No Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk5 Device Identifier: disk5 Device Node: /dev/disk5 Part of Whole: disk5 Device / Media Name: USB SanDisk 3.2Gen1 Media Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): FDisk_partition_scheme OS Can Be Installed: No Media Type: Generic Protocol: USB SMART Status: Not Supported Total Size: 123.1 GB (123060879360 Bytes) (exactly 240353280 512-Byte-Units) Volume Free Space: Not applicable (no file system) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: Not applicable (no file system) Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk6 Device Identifier: disk6 Device Node: /dev/disk6 Part of Whole: disk6 Device / Media Name: Apple disk image Media Volume Name: untitled Escaped with Unicode: untitled Mounted: Yes Mount Point: /private/var/db Escaped with Unicode: /private/var/db File System Personality: HFS+ Type (Bundle): hfs Name (User Visible): Mac OS Extended Owners: Enabled Content (IOContent): None OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Volume UUID: 974F5EC7-4430-30EA-9260-5EF4D00FCEE7 System Image: Yes Total Size: 524.3 KB (524288 Bytes) (exactly 1024 512-Byte-Units) Volume Free Space: 249.9 KB (249856 Bytes) (exactly 488 512-Byte-Units) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: No Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk7 Device Identifier: disk7 Device Node: /dev/disk7 Part of Whole: disk7 Device / Media Name: Apple disk image Media Volume Name: untitled Escaped with Unicode: untitled Mounted: Yes Mount Point: /private/var/folders Escaped with Unicode: /private/var/folders File System Personality: HFS+ Type (Bundle): hfs Name (User Visible): Mac OS Extended Owners: Enabled Content (IOContent): None OS Can Be Installed: No Media Type: Generic Protocol: Disk Image SMART Status: Not Supported Volume UUID: 582CC33F-4D1F-30AC-8197-D8D32AF48221 System Image: Yes Total Size: 6.3 MB (6291456 Bytes) (exactly 12288 512-Byte-Units) Volume Free Space: 4.4 MB (4448256 Bytes) (exactly 8688 512-Byte-Units) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: No Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2# diskutil info disk12 Could not find disk: disk12 -bash-3.2# diskutil info disk11 Could not find disk: disk11 -bash-3.2# diskutil info disk10 Could not find disk: disk10 -bash-3.2# diskutil info disk9 Could not find disk: disk9 -bash-3.2# diskutil info disk8 Could not find disk: disk8 -bash-3.2# diskutil info disk5 Device Identifier: disk5 Device Node: /dev/disk5 Part of Whole: disk5 Device / Media Name: USB SanDisk 3.2Gen1 Media Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): FDisk_partition_scheme OS Can Be Installed: No Media Type: Generic Protocol: USB SMART Status: Not Supported Total Size: 123.1 GB (123060879360 Bytes) (exactly 240353280 512-Byte-Units) Volume Free Space: Not applicable (no file system) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: Not applicable (no file system) Ejectable: Yes Whole: Yes Internal: No OS 9 Drivers: No Low Level Format: Not supported -bash-3.2#