如何在centos上安装mke2fs?
How to install mke2fs on centos?
我试过virtual box和docker安装最新版本的centos,都没有"mke2fs"命令。然后我尝试使用 root 并键入:
yum install mke2fs*
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
……
没有可用的软件包 mke2fs*。
这是为什么?它是否在除 mke2fs 之外的另一个软件包名称中?
您可以使用 yum provides
。
提供=查找提供给定值的包
$ yum provides mke2fs
e2fsprogs-1.42.9-9.el7.x86_64 : Utilities for managing ext2, ext3, and ext4 filesystems
Repo : base
Matched from:
Filename : /usr/sbin/mke2fs
所以我安装了 e2fsprogs(我在 docker 中安装):
FROM centos:7
RUN yum -y update && \
yum -y install e2fsprogs
构建它并启动我的容器:
$ docker run -it my-centos bash
[root@1ef2a7d930cf /]# mke2fs
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G flex-group-size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]
我试过virtual box和docker安装最新版本的centos,都没有"mke2fs"命令。然后我尝试使用 root 并键入:
yum install mke2fs*
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
…… 没有可用的软件包 mke2fs*。
这是为什么?它是否在除 mke2fs 之外的另一个软件包名称中?
您可以使用 yum provides
。
提供=查找提供给定值的包
$ yum provides mke2fs
e2fsprogs-1.42.9-9.el7.x86_64 : Utilities for managing ext2, ext3, and ext4 filesystems
Repo : base
Matched from:
Filename : /usr/sbin/mke2fs
所以我安装了 e2fsprogs(我在 docker 中安装):
FROM centos:7
RUN yum -y update && \
yum -y install e2fsprogs
构建它并启动我的容器:
$ docker run -it my-centos bash
[root@1ef2a7d930cf /]# mke2fs
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G flex-group-size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]