$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *251.0 GB disk0 1: EFI EFI 314.6 MB disk0s1 2: Apple_APFS Container disk1 250.7 GB disk0s2
/dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +250.7 GB disk1 Physical Store disk0s2 1: APFS Volume Macintosh HD - 数据 141.3 GB disk1s1 2: APFS Volume Preboot 82.4 MB disk1s2 3: APFS Volume Recovery 528.1 MB disk1s3 4: APFS Volume VM 4.3 GB disk1s4 5: APFS Volume Macintosh HD 11.1 GB disk1s5
/dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *15.7 GB disk2 1: Windows_NTFS ESD-USB 15.7 GB disk2s1
/dev/disk2 就是我的U盘
2. 卸载U盘
卸载/dev/disk2:
1 2
$ diskutil unmountDisk /dev/disk2 Unmount of all volumes on disk2 was successful
3. 使用dd 工具把镜像文件写到U盘里
1 2 3 4 5
$ sudo dd if=/Users/huazhizui/Downloads/CentOS-7-x86_64-DVD-1908.iso of=/dev/disk2 bs=1m Password: 4448+0 records in 4448+0 records out 4664066048 bytes transferred in 4102.428971 secs (1136904 bytes/sec)