容器中运行ifconfig提示bash: ifconfig: command not found
这个问题是因为在容器中没有安装ifconfig命令。
在容器中安装ifconfig命令,可以使用以下命令:
对于基于Debian/Ubuntu的容器,使用以下命令:
apt-get update
apt-get install -y net-tools
对于基于CentOS/RHEL的容器,使用以下命令:
yum install -y net-tools
容器Ubuntu示例:

容器中运行ifconfig提示bash: ifconfig: command not found
这个问题是因为在容器中没有安装ifconfig命令。
在容器中安装ifconfig命令,可以使用以下命令:
对于基于Debian/Ubuntu的容器,使用以下命令:
apt-get update
apt-get install -y net-tools
对于基于CentOS/RHEL的容器,使用以下命令:
yum install -y net-tools
容器Ubuntu示例:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/22516.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!