User Feedback :: How to set the PATH ?
hello everybody i do not more remember in wich file to set manually PATH and LD_Libs
setenv do not work and export is not recorded.
Thansk for answer
Look at .bashrc and/or .bash_profile - not quite sure about the difference between the two.
.bash_profile is for running commands when you open a bash login shell, and .bashrc is for executing commands when you open a non-login bash shell. You can set variables in any shell, but if you want the variable to be in use at all times it's best to export from .bash_profile (or .profile for non-bash shells)
In Bash you set the PATH for the current shell this way:
PATH=/a/path:/another/path:$PATH
The last part appends the current path to the end of the new path (almost always a good idea so you don't lose anything).
Set the path for the current shell and child shells with this command:
export PATH=/a/path:/another/path:$PATH
This should work in most cases.
Setting the LD_LIBRARY_PATH *should* work the same way, but it seems there might be a bug in rxvt. I've seen times when rxvt does not receive the exported LD_LIBRARY_PATH from .bash_profile...not sure why, but I've occasionally had to source .bash_profile in order for that variable to work with scripts run in rxvt.
thanks a lot thats why I want to configure manually my path.
I m completely happy with DSL, after having a Mandrake, then an Aurora 10.0 , then a FC2, then a FC3, and tried the Ubuntu 4.0; really damn small and its dsl package is more stable than everybody and I can do wath i need with it.
That s great and perfect !
original here.