歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux Command not Found 問題解決

Linux Command not Found 問題解決

日期:2017/2/28 15:31:00   编辑:Linux教程

修改/etc/profile文件,注釋掉if語句即可。
把下面的if語句注釋掉:

# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

修改為:

# Path manipulation
# if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
#fi

注:不光是ifconfig命令出現“bash: ifconfig: command not found”,原因非root用戶的path中沒有/sbin/ifconfig
,其它的命令也可以出現這種情況,解決的方法是一樣的。

Copyright © Linux教程網 All Rights Reserved