Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.