码迷,mamicode.com
首页 > 系统相关 > 详细

【linux】.bash_profile

时间:2015-05-18 14:53:27      阅读:197      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!