linux ifconfig找不到

  提示命令不存在

  原因: 系统默认的环境变量设置不对

  而,ifconfig恰恰就在/sbin里面。

  下cat /etc/profile, 可以发现没有关于/sbin的环境变量。

Linux,习惯用gedit)

  PATH=$PATH:/sbin      #在PATH变量后追加/sbin目录

  保存并退出。

  改完之后,执行命令:. .bash_profile,也可以注销下或者重启才能使刚刚修改的内容生效。

         转载于:http://linguanqiang.blog.sohu.com/167284269.html

原文地址:https://www.cnblogs.com/diyunpeng/p/6812304.html