mke2fs 是 Linux/Unix 系统中的一个命令,用来在指定的块设备或分区上创建 ext2/ext3/ext4 文件系统(即“格式化”为 ext 系列文件系统)。它通常由 mkfs.ext2/mkfs.ext4 等前端命令间接调用;除创建 ext2 外,也常用于创建 ext4(通过选项或对应链接)。
/ˌɛm.keɪˈtuː.ɛf.ɛs/
I used mke2fs to format the new partition as ext4.
我用 mke2fs 把新分区格式化为 ext4 文件系统。
Before deploying the server, the admin ran mke2fs -t ext4 -L data /dev/sdb1 to create a labeled filesystem and then updated /etc/fstab for automatic mounting.
在部署服务器之前,管理员运行 mke2fs -t ext4 -L data /dev/sdb1 创建带标签的文件系统,然后更新 /etc/fstab 以便自动挂载。
mke2fs 来自短语 make ext2 filesystem 的缩写:mk 表示“创建/制作”,e2 指 ext2(第二代扩展文件系统),fs 是 filesystem(文件系统)。虽然名字包含 ext2,但在现代系统中它也常被用于创建 ext3/ext4(通过参数或对应工具链)。