MacOS格式化 U 盘

最近工作需要买了个64G的U盘,在Windows系统下使用格式化了 NTFS 格式,但是在Mac上无法写入,macOS默认仅支持读取NTFS,还得再格一次,真是格老子的了。

Mac 上“磁盘工具”中可用的文件系统格式

Mac 上的“磁盘工具”支持多种文件系统格式:

  • Apple 文件系统 (APFS):macOS 10.13 或后续版本使用的文件系统。

  • Mac OS 扩展:macOS 10.12 或之前版本使用的文件系统。

  • MS-DOS (FAT) 和 ExFAT:与 Windows 兼容的文件系统。

Windows 兼容格式

如果格式化磁盘以配合 Windows 使用,请选取以下其中一种兼容 Windows 的文件系统格式。

  • MS-DOS (FAT):用于 Windows 宗卷且大小为 32 GB 或不足 32 GB。

  • ExFAT:用于 Windows 宗卷且大小超过 32 GB。

文件系统选择

MacOS格式化 U 盘


MacOS 使用终端格式化 U 盘

在面对无法清除U盘分区,无法写入,无法抹掉情况时,在 Mac 上可以使用终端彻底格式化 U 盘,可以使用 diskutil 命令。以下是详细步骤:

⚠️ 注意事项

  • 格式化会清空 U 盘上的所有数据,请先备份重要文件。

  • 确保选择了正确的 U 盘,否则可能误删其他数据。

1、打开终端查看 U 盘信息

输入以下命令查看所有磁盘设备:

diskutil list

2、卸载 U 盘

格式化前,先卸载 U 盘:

diskutil umountDisk /dev/disk4

3、覆盖 U 盘(可选)

diskutil zeroDisk /dev/disk4

4、彻底格式化 U 盘

格式化并抹除 U 盘,使用以下命令:

diskutil eraseDisk FAT32 USB_NAME MBRFormat /dev/disk4
  • FAT32 —— 兼容 Windows 和 macOS(可改为 ExFATAPFS)。

  • USB_NAME —— 你想给 U 盘起的名字(可替换为你喜欢的)。

  • MBRFormat —— 使用主引导记录 (MBR),适用于 U 盘。

  • /dev/disk4 —— 确保这里是你的 U 盘编号!

完整操作示例:

> diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:             Apple_APFS_ISC Container disk1         524.3 MB   disk0s1
   2:                 Apple_APFS Container disk3         494.4 GB   disk0s2
   3:        Apple_APFS_Recovery Container disk2         5.4 GB     disk0s3

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +494.4 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume MacintoshHD - Data      365.9 GB   disk3s1
   2:                APFS Volume MacintoshHD             10.2 GB    disk3s3
   3:              APFS Snapshot com.apple.os.update-... 10.2 GB    disk3s3s1
   4:                APFS Volume Preboot                 6.1 GB     disk3s4
   5:                APFS Volume Recovery                933.9 MB   disk3s5
   6:                APFS Volume VM                      20.5 KB    disk3s6

/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *62.9 GB    disk4
   1:               Windows_NTFS                         62.9 GB    disk4s1

> diskutil unmountDisk /dev/disk4
Unmount of all volumes on disk4 was successful

> diskutil eraseDisk FAT32 USB_NAME MBRFormat /dev/disk4
Started erase on disk4
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk4s1 as MS-DOS (FAT32) with name USB_NAME
512 bytes per physical sector
/dev/rdisk4s1: 122847872 sectors in 1919498 FAT32 clusters (32768 bytes/cluster)
bps=512 spc=64 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2048 drv=0x80 bsec=122877952 bspf=14997 rdcl=2 infs=1 bkbs=6
Mounting disk
Finished erase on disk4

示例中U 盘的 IDENTIFIER 是 disk4(你的可能不同)。

如果要使用 ExFAT 格式(支持大文件,兼容性好):

diskutil eraseDisk ExFAT USB_NAME MBRFormat /dev/disk4

如果要格式化为 macOS 专用格式 (APFS)

diskutil eraseDisk APFS USB_NAME GPT /dev/disk4

5、安全擦除(可选)

如果要彻底清除数据,使其难以恢复,可以用 secureErase

diskutil secureErase 2 /dev/disk4

参数解释:

  • 0 – 快速擦除(不安全)。

  • 1 – 单次写入 0。

  • 2 – (推荐) 7 次写入随机数据。

  • 3 – 35 次写入随机数据(极端安全)。

6、弹出 U 盘

格式化完成后,可以安全弹出:

diskutil eject /dev/disk4

然后拔掉 U 盘即可。

格式化 U 盘命令操作顺序

  1. diskutil list → 找到 U 盘的编号。

  2. diskutil unmountDisk /dev/diskX → 卸载 U 盘。

  3. diskutil zeroDisk /dev/diskX → 覆盖 U 盘。(可选)

  4. diskutil eraseDisk FORMAT USB_NAME MBRFormat /dev/diskX → 彻底格式化。

  5. diskutil secureErase ARGS /dev/diskX → 安全擦除数据。(可选)

  6. diskutil eject /dev/diskX → 安全弹出 U 盘。


MacOS 使用“磁盘工具”格式化 U 盘

在“磁盘工具”中,可以格式化可用在基于 Microsoft Windows 的电脑以及 Mac 的外置磁盘。

【警告】格式化磁盘或宗卷会抹掉其中的所有文件。格式化之前,请将需要的任何文件存储到另一个宗卷。

  1. 在 Mac 上的“磁盘工具” App MacOS格式化 U 盘 中,选取“显示”>“显示所有设备”。

    如果“磁盘工具”未打开,请点按程序坞中的“启动台”图标 MacOS格式化 U 盘,在搜索栏中键入“磁盘工具”,然后点按“磁盘工具”图标 MacOS格式化 U 盘

  2. 在边栏中,选择要格式化以用于 Windows 电脑的磁盘。MacOS格式化 U 盘

  3. 点按工具栏中的“抹掉”按钮 MacOS格式化 U 盘

  4. 在“抹掉”对话框中,点按“方案”弹出式菜单,然后选取一种分区方案MacOS格式化 U 盘

  5. 点按“格式”弹出式菜单,然后选取以下一项:

    • MS-DOS (FAT):如果磁盘大小不超过 32 GB,请选取此格式。

    • ExFAT:如果磁盘大小超过 32 GB,请选取此格式。

  6. 输入宗卷的名称。

    宗卷名称的最大长度为 11 个字符。

  7. 点按“抹掉”,然后点按“完成”。MacOS格式化 U 盘MacOS格式化 U 盘


参考:

anzhihe 安志合个人博客,版权所有 丨 如未注明,均为原创 丨 转载请注明转自:https://chegva.com/6502.html | ☆★★每天进步一点点,加油!★★☆ | 

您可能还感兴趣的文章!

发表评论

电子邮件地址不会被公开。 必填项已用*标注