先找下ifconfig的位置吧: #whereis ifocnfig 路径如下 /sbin/ifconfig 直接运行 /sbin/ifconfig 显示了网卡信息 但是这样每次都输入 /sbin/ifconfig 挺麻烦的。$ su root切换到root 下
输入#export PATH=$PATH:/sbinOK。现在就可以直接#ifconfig
永久生效编辑 vi /etc/profile 添加上:/sbin