Linux 7 提示 -bash: ifconfig: command not found

在 Linux 7 服务器上,如果执行 ifconfig 命令,提示信息如下:

-bash: ifconfig: command not found

说明该包没有安装,不能执行 ifconfig 命令,也可以到目录/sbin下确认下:

ls /sbin/* |grep 'ifconfig'

Linux 7 提示 -bash: ifconfig: command not found

可以尝试下 pifconfig,也是可以看相关信息的。

Linux 7 提示 -bash: ifconfig: command not found

如果就习惯用 ifconfig,则需要通过下面命令安装工具包 net-tools,命令如下:

yum install net-tools

再次查看sbin目录,可以看到已经有ifconfig了,执行命令:

Linux 7 提示 -bash: ifconfig: command not found

 ifconfig

Linux 7 提示 -bash: ifconfig: command not found

可以看到错误已解决。

相关文章:

  • 2021-11-19
  • 2021-09-01
  • 2021-08-08
  • 2022-12-23
  • 2021-09-05
  • 2021-04-25
  • 2022-02-08
  • 2021-06-05
猜你喜欢
  • 2021-06-11
  • 2022-12-23
  • 2021-05-15
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
相关资源
相似解决方案