diskutil list
将列出所有磁盘及其标识符,即使已卸载也是如此。
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Mac SSD 150.0 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Microsoft Basic Data Windows 8 100.1 GB disk0s4
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *500.1 GB disk1
1: Apple_HFS George Garside 300.2 GB disk1s1
2: Windows_NTFS GRGARSIDE 199.9 GB disk1s2
仅适用于已安装的磁盘…
要查找原始设备名称(即/dev/disk0s1
),可以运行df
。
您可以将结果限制为本地安装的文件系统,请使用df -Hl
。
这将产生分区及其原始设备名称的列表,如下所示:
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk0s2 150G 130G 20G 87% 31761475 4859615 87% /
/dev/disk0s4 100G 83G 17G 83% 184667 17015601 1% /Volumes/Windows 8
/dev/disk1s1 300G 282G 19G 94% 68771109 4529660 94% /Volumes/George Garside
/dev/disk1s2 200G 172G 27G 87% 144125 26731127 1% /Volumes/GRGARSIDE