mikeshn

Senior member
Oct 9, 2001
367
0
0
I ?m using bash in Linux (Red Hat 7.1). Can someone explain to me how can I add a program to path, that I will able a program from bash command line.

Thanks in advance
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
add this line to your .bashrc file:

export PATH=$PATH:/new/path

Then source your .bashrc file again.

You can also execute that from the command line if you don't need it all the time.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Unless you want the path change to be specific to your account, it might be easier to edit /etc/profile - there should be a default path listed in there somewhere. That way you don't have to deal with the difference between .bash_profile and .bashrc either.