红联Linux门户
Linux帮助

CentOS:运行ifconfig提示command not found

发布时间:2014-09-14 09:43:37来源:linux网站作者:stefan321

CentOS 运行ifconfig等命令, 提示command not found

原因:/bin  /sbin等一些的路径并未添加到环境变量中


不妨做个试验:
cd /etc/sbin

./ifconfg
正确显示结果。


编辑/etc/profile等文件,将这些路径添加至环境变量中
eg:
vi /home/用户目录/.bash_profile中添加
PATH=$PATH:$HOME/bin:/sbin:/bin
export PATH