0

Possible Duplicate:
How do I set a user environment variable? (permanently, not session)

So each time I log on I want to execute a command like export PATH=~/gcc-4.5.0-g/bin:$PATH. I have no sudo rights. So how to make a .sh execute each time I log in?

2 Answers2

2

You can do it in the .profile, .bashrc or .bash_profile files located in your home directory.

Mat
  • 52,586
0

A nice approach is create a $HOME/bin directory that contains links to yours executables files:

mkdir $HOME/bin
ln -s $HOME/gcc-4.5.0-g/bin/gcc $HOME/bin/gcc
ln -s $HOME/project-Y/bin/py $HOME/bin/py

Now you can export only the main bin directory instead of each each small one. Use .profile, .bashrc or .bash_profile files located in your home to put export PATH=$HOME/bin:$PATH.