分页: 1 / 1

关于.bash_profile

发表于 : 2007-02-07 21:16
switch
里面有一段代码,原先就有的。

代码: 全选

if [ -d ~/bin ] ; then
    PATH="${PATH}":~/bin
fi
我在自己的目录里建了一个bin文件夹,但是开机后这个路径并没有加进去。
不知道应该怎么修改?

发表于 : 2007-02-07 21:26
eexpress
重启过?直接执行验证过?

发表于 : 2007-02-07 21:38
switch
重启过。
终端下的错误提示是:

代码: 全选

-bash:/home/route/.bash_profile:line 14: synatx error near unexpected token 'then'
-bash:/home/route/.bash_profile:line 14: 'if [ -d ~/bin ] ; then'


发表于 : 2007-02-07 21:53
eexpress
;前面的空格

发表于 : 2007-02-07 21:59
switch
改了,一样不行啊

Re: 关于.bash_profile

发表于 : 2007-02-25 16:46
patrickhe
switch 写了:里面有一段代码,原先就有的。

代码: 全选

if [ -d ~/bin ] ; then
    PATH="${PATH}":~/bin
fi
我在自己的目录里建了一个bin文件夹,但是开机后这个路径并没有加进去。
不知道应该怎么修改?
你说的终端是指 gnome-terminal 吧?
如果是的,在 gnome-terminal 的 Edit->Current Profile->Title and Command 中,把 Run command as a login shell 给选上。这样在启动 gnome-terminal 的时候才会加载 ~/.bash_profile 文件的。