标签:PATH
PATH路径简单理解[root@localhost kang]# vi yy
echo YY
[root@localhost kang]# chmod +x yy
[root@localhost kang]# ./yy
YY
[root@localhost kang]# pwd
/root/kang
目的修改PATH路径,让用户在任何目录下输入yy都可执行
[root@localhost kang]# PATH="$PATH:/root/kang"
[root@localhost kang]# echo $PATH
/usr/local/java//bin:/usr/local/java//bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/kang
验证:
[root@localhost /]# pwd
/
[root@localhost /]# yy
YY
标签:PATH
原文地址:http://blog.51cto.com/12965094/2115539