• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Macmac 系统下格式化U盘或移动硬盘为ext4格式

武飞扬头像
iHero
帮助1

1. 打开终端,安装 homebrew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

2. 安装之后再次运行此命令

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

3. 安装e2fsprogs

brew install e2fsprogs

4. 查看所有硬盘分区

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. 先卸载需要格式化的分区,比如需要格式化的分区是disk4s1


diskutil unmountdisk /dev/disk4s4
Unmount of all volumes on disk4 was successful

6. 格式化分区为ext4格式

sudo $(brew --prefix e2fsprogs)/sbin/mkfs.ext4 /dev/disk4s4
Password:
mke2fs 1.46.5 (30-Dec-2021)
 /dev/disk4s4 有一个 ntfs 文件系统
无论如何也要继续?(y,N) y
创建含有 61049612 个块(每块 4k)和 15269888 个inode的文件系统
文件系统UUID:12846802-61d6-4099-b2a2-d21bd6048e64
超级块的备份存储于下列块: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

正在分配组表: 完成                            
正在写入inode表: 完成                            
创建日志(262144 个块)

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhggciki
系列文章
更多 icon
同类精品
更多 icon
继续加载