Centos 5.8 安裝後不能使用ifconfig

今天在VMware上安裝了CentOs 5.8 後把網卡刪了,以後添加上後發現ifconfig不能使用(以前沒有用過)bash


出現問題表現爲:ide

$ifconfigspa

-bash:ifconfig :command not foundit

查找ifconfigclass

$whereis ifconfigfile

ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gzcommand

說明有這個咚咚密碼

$echo $PATHdi

/usr/kerberos/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/home/pcname/bin文件

發現沒有sbin

添加sbin

$su root

輸入密碼

#vi /etc/profile

在文件最後插入:

PATH=$PATH:/sbin

export PATH=$PATH:/sbin

保存退出(:wq!)

從新加載一下

#source /etc/profile

以後在敲ifconfig就ok了

相關文章
相關標籤/搜索