强调:修改PATH 必需要有Root的权限;也就是说普通用户必需要获得root的权限,才能修改PATH
比如不能直接使用ifconfig 指令
当然不能直接使用ifconfig,也可以使用/sbin/ifconfig 也是可以运行的
现在我们一这个为例子:
在root下直接:
打开/etc/profile下
# vim /etc/profile下
普通用户:
# su root 后输入root的密码
打开/etc/profile下
# vim /etc/profile下
以下为root用户和普通用户共有:
在export PATH 后面添加 PIFCONFIG
export PATH USER PIFCONFIG
好了现ok
可以直接运行ifconfig