Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to add ~/.bin into my path and for that I edited the .bash_profile and added the below line

PATH=$PATH:$HOME/.bin/

and than I logged out/in.

Now when I do echo $PATH I get

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

and you can see there is no ~/.bin directory added .

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

You should try to source .bash_profile, and echo $PATH to see if your path got updated. If yes, it means your .bash_profile is not read upon log-in.

share|improve this answer
    
source .bash_profile worked. How can I make sure that .bash_profile is read upon log-in. –  Noob Sep 6 '12 at 11:21
    
Well, it's kind of hard to answer, it depends how you login. You can read the section INVOCATION of man bash to see which file is read when... –  m4573r Sep 6 '12 at 11:24
1  
@Noob: This might give you some insight. –  RanRag Sep 6 '12 at 11:25
    
I think your problem is that you want to put the line in ~/.bashrc instead. –  m4573r Sep 6 '12 at 11:26
    
But I thought that to add a folder to path .bash_profile is the file to be edited and not .bashrc. –  Noob Sep 6 '12 at 11:27
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.