Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to add a directory to the path for non-login shells on a Red Hat Server.

ssh user@server echo \$PATH 

returns

/usr/local/bin:/bin:/usr/bin

How can I add a directory to this path. I tried putting export PATH=$PATH:/my/path in /etc/bashrc and ~/.bashrc but in both cases ssh user@server echo \$PATH gives the same result as above. So where is that magic place to add my/path to $PATH for non-login shells?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

This doesn't directly answer your question since I haven't tested it on redhat, but for ubuntu users check out /etc/environment

share|improve this answer
    
Yep, worked on redhat. Thanks! –  calebthorne Sep 29 '10 at 21:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.