先找下ifconfig的位置吧: #whereis ifocnfig
路径如下 /sbin/ifconfig
直接运行 /sbin/ifconfig 显示了网卡信息
但是这样每次都输入 /sbin/ifconfig 挺麻烦的。
$ su root
切换到root 下
输入
#export PATH=$PATH:/sbin
OK。现在就可以直接
#ifconfig
永久生效编辑 vi /etc/profile 添加上:/sbin
先找下ifconfig的位置吧: #whereis ifocnfig
路径如下 /sbin/ifconfig
直接运行 /sbin/ifconfig 显示了网卡信息
但是这样每次都输入 /sbin/ifconfig 挺麻烦的。
$ su root
切换到root 下
输入
#export PATH=$PATH:/sbin
OK。现在就可以直接
#ifconfig
永久生效编辑 vi /etc/profile 添加上:/sbin
转载于:https://www.cnblogs.com/sherlockhomles/archive/2013/05/20/3089273.html