问题:新装的centos系统或者拉取的镜像跑容器的时候,查看ip地址时输入ifconfig会显示ifconfig command not found

  1. 输入ip addr确认IP地址是否设置正常,设置好如下所示,如果没有获取到IP地址,则需要设置一个。
    centos系统解决ifconfig command not found

  2. 确认ifconfig命令是否未安装
    cd /sbin
    ls -ll
    发现并没有ifconfig。

  3. 安装net-tool插件,此插件中带有此命令
    安装命令:
    sudo yum install net-tools
    等待安装完成,再次输入ifconfig,成功查看到ip。

相关文章:

  • 2021-08-20
  • 2022-12-23
  • 2021-12-23
  • 2021-04-29
  • 2021-09-26
  • 2021-04-25
猜你喜欢
  • 2021-04-25
  • 2021-10-07
  • 2022-12-23
  • 2022-02-28
  • 2022-01-22
  • 2021-07-08
相关资源
相似解决方案