PATH Issue
As of late, I am being required to change my PATH to include some more directories. I type the following command into Bash:
Code:
$ PATH=$PATH:[Insert Dir.] Thank you! |
Put this in your /etc/bashrc file...
PATH=$PATH:/sbin/ PATH=$PATH:/usr/sbin/ export PATH of course, change the paths to whichever suit you... Now each time you open a terminal it should see this path... Good luck! |
jeffreybluml is correct. Just to add: Changing the path in /etc/bashrc changes it for all users. If someone only wants to make changes for one user do the above in the users .bashrc located in their home directory.
|
Thanks, very helpful.
|
You can save a line by cramming multiple paths together.
Instead of: PATH=$PATH:/sbin/ PATH=$PATH:/usr/sbin/ export PATH you can do: PATH=$PATH:/sbin:/usr/sbin export PATH |
You can simply it down to one line
export PATH=$PATH:/sbin:/usr/sbin |
What is thie export command?
Is it a command or a file? Where does it lie? I guess it is bin. Please tell me. |
The export command is integrated into bash. You need to open a shell and type the command, followed by the instructions.
|
PATH
Hi,
I installed JDK1.0.5.0_01 on a Mandrake 10.1 System. I am a Newbie but I thought I would find my way.... so first of all I edited /etc/profile and included PATH="$PATH:/usr/local/jdk1.5.0_01/bin" between umask 022 and USER='id -un' than I restarted the session and typed: java -version in the "normal" user mode I got the information (Version number and so on) but as root I didn't get it ( I got bash: java: command not found) But I really need java for the root user to install OpenXchange. Wich file do I have to edit to include the PATH for the root? Please discribe it clearly ;-) :newbie: |
root specific bash configuration:
/root/.bash_profile and /root/.bashrc system wide can vary but usually: /etc/profile and /etc/bashrc individual users: .bash_profile and .bashrc of the users home dir. |
All times are GMT -5. The time now is 07:39 AM. |