0

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.

2 Answers 2

1

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.

8
  • How can I add /usr/local/util to $PATH in linux?
    – apache
    May 23, 2010 at 2:58
  • Depends on the shell. For bash look in ~/.bash_profile or ~/.bashrc. May 23, 2010 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, 2010 at 3:09
  • ~/.bash_profile is read when logging in. May 23, 2010 at 3:13
  • Oh thanks!What's the difference of .bash_profile and .bashrc ?
    – apache
    May 23, 2010 at 3:17
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .