首页 > 系统服务 > 详细

【linux】.bash_profile

时间:2015-05-18 14:51:52      阅读:199      评论:0      收藏:0      [点我收藏+]

一、普通用户
如果一些程序没有安装在系统默认的路径(ie /bin/, /usr/bin, /usr/local/bin/ )里面,这个时候普通用户想要调用这些命令,必须设定路径。方法很简单:以普通用户登录,然后在终端输入

vi ~/.bash_profile

会出现如下的内容:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

export PATH
此时,只要在export PATH前面加入自己的路径即可,例如我的修改后如下:

[yyc@localhost bin]$ cat ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
               . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:/usr/local/programs/crosstool/gcc-4.0.2-glibc-2.3.6/arm-linux-gnu/bin/
export PATH



【linux】.bash_profile

原文:http://my.oschina.net/u/347414/blog/416165

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!