PDA

View Full Version : [SOLVED] PATH enviromental variable problems



71GA
January 1st, 2011, 11:11 PM
Hello i have been trying to execute custom scripts in CLI and it works fine for some time and then it just stops. I added a path where scripts are by typing in a command:

export PATH=/home/ziga/codesourcery/bin:"${PATH}"I allso used same command in /etc/bash.bashrc. After a while my /etc/bash.bashrc is empty!?

What is going on? Did i mess anything?

AlphaLexman
January 1st, 2011, 11:23 PM
You should put the new $PATH in your ~/.bashrc
~/.bashrc is the last file invoked by the interactive shell.

71GA
January 2nd, 2011, 07:55 AM
You should put the new $PATH in your ~/.bashrc
~/.bashrc is the last file invoked by the interactive shell.

Can you just tell me how to do this for this example path "/home/ziga/codesourcery/bin"... just soo that i ll do it right.

TY

AlphaLexman
January 2nd, 2011, 04:39 PM
Just copy and paste into a terminal:

echo "PATH=${PATH}:/home/ziga/codesourcery/bin/" >> ~/.bashrc
Then,

source ~/.bashrc
will re-read the config file.

71GA
January 8th, 2011, 08:43 PM
Ty guys i am closing this thread now :) [SOLVED]