1. 打開終端,安裝 homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
2. 安裝之后再次運(yùn)行此命令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
3. 安裝e2fsprogs
brew install e2fsprogs
4. 查看所有硬盤分區(qū)
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: Apple_APFS_ISC Container disk2 524.3 MB disk0s1
2: Apple_APFS Container disk3 245.1 GB disk0s2
3: Apple_APFS_Recovery Container disk1 5.4 GB disk0s3
/dev/disk3 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +245.1 GB disk3
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 202.0 GB disk3s1
2: APFS Volume Macintosh HD 8.8 GB disk3s3
3: APFS Snapshot com.apple.os.update-... 8.8 GB disk3s3s1
4: APFS Volume Preboot 5.1 GB disk3s4
5: APFS Volume Recovery 1.5 GB disk3s5
6: APFS Volume VM 14.0 GB disk3s6
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *250.1 GB disk4
1: Windows_NTFS 250.1 GB disk4s4
5. 先卸載需要格式化的分區(qū),比如需要格式化的分區(qū)是disk4s1
diskutil unmountdisk /dev/disk4s4
Unmount of all volumes on disk4 was successful
6. 格式化分區(qū)為ext4格式
sudo $(brew --prefix e2fsprogs)/sbin/mkfs.ext4 /dev/disk4s4
Password:
mke2fs 1.46.5 (30-Dec-2021)
/dev/disk4s4 有一個(gè) ntfs 文件系統(tǒng)
無論如何也要繼續(xù)?(y,N) y
創(chuàng)建含有 61049612 個(gè)塊(每塊 4k)和 15269888 個(gè)inode的文件系統(tǒng)
文件系統(tǒng)UUID:12846802-61d6-4099-b2a2-d21bd6048e64
超級(jí)塊的備份存儲(chǔ)于下列塊:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
正在分配組表: 完成
正在寫入inode表: 完成
創(chuàng)建日志(262144 個(gè)塊)
文章來源地址http://www.zghlxwxcb.cn/news/detail-636924.html
文章來源:http://www.zghlxwxcb.cn/news/detail-636924.html
到了這里,關(guān)于【Mac】mac 系統(tǒng)下格式化U盤或移動(dòng)硬盤為ext4格式的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!