Linux Command not Found 问题解决
修改/etc/profile文件,注释掉if语句即可。
把下面的if语句注释掉:
#Pathmanipulation
if["$EUID"="0"];then
pathmunge/sbin
pathmunge/usr/sbin
pathmunge/usr/local/sbin
fi
修改为:
#Pathmanipulation
#if["$EUID"="0"];then
pathmunge/sbin
pathmunge/usr/sbin
pathmunge/usr/local/sbin
#fi
注:不光是ifconfig命令出现“bash:ifconfig:commandnotfound”,原因非root用户的path中没有/sbin/ifconfig
,其它的命令也可以出现这种情况,解决的方法是一样的。