CentOS7:ifconfig command not found解决

左手的ㄟ右手 2022-04-14 21:13 338阅读 0赞

Questions

使用docker基础镜像centos的时候,期望使用ifconfig命令查询本地ip地址时,报错如下ifconfig command not found.

Solution

  • 首先判断一下是不是缺少了ifconfig,它是在/sbin目录下的

    [root@localhost ~]# cd /sbin

    1. [root@localhost sbin]# ls
  • 查看一下是否有 ifconfig。
    没有 ifconfig 的话安装 net-tools package

    [root@localhost sbin]# sudo yum install net-tools


Reference

[1]. CentOS7:ifconfig command not found解决

发表评论

表情:
评论列表 (有 0 条评论,338人围观)

还没有评论,来说两句吧...

相关阅读