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.

There are multiple binaries under /usr/local/util so I don't want to do it by running ln -s /bin/util_i /usr/local/util/util_i multiple times.

Anyway,what I want to achieve is that I don't need to type /usr/local/util/ to run binaries under it.

share|improve this question

2 Answers 2

Don't copy into /bin if you can help it.

cp -sn /usr/local/util/* /usr/local/bin

But what you should be doing is adding /usr/local/util to $PATH.

share|improve this answer
    
How can I add /usr/local/util to $PATH in linux? –  apache May 23 '10 at 2:58
    
Depends on the shell. For bash look in ~/.bash_profile or ~/.bashrc. –  Ignacio Vazquez-Abrams May 23 '10 at 3:03
    
I modified .bash_profile this way but doesn't work: PATH=$PATH:$HOME/bin:/usr/local/subversion/bin.Do I need to run some command to notify bash to refresh the settings? –  apache May 23 '10 at 3:09
    
~/.bash_profile is read when logging in. –  Ignacio Vazquez-Abrams May 23 '10 at 3:13
    
Oh thanks!What's the difference of .bash_profile and .bashrc ? –  apache May 23 '10 at 3:17

why not add this path to $PATH in /etc/profile

according to this link, the sequence of configuration files is

  • /etc/profile
  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile
share|improve this answer

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.