1

How do you :

"Create as administrator (sudo) one link in /usr/bin to the command that you'd like to call (for example with8.5 and tclsh8.5). One time that you had create the links you can run directly tclsh8.5 or wish8.5 in one terminal."

http://community.activestate.com/node/7489

Does that mean to link to the particular binary from the /opt directory?

5

Yes. To make commands available in PATH, you can either

a) Add the directory to your PATH variable by putting something like the following line in /etc/profile (systemwide) or ~/.profile (your user)

PATH=/opt/ActiveTcl-8.4/bin:$PATH

b) Add symbolic links to the commands in a directory already in PATH (echo "$PATH")

sudo ln -s /opt/ActiveTcl-8.4/bin/* /usr/local/bin

Note that with method (a), the changes will not take effect until next log in.

  • to define systemwide environment it is better to set edit /etc/environment file. Anyhow, /etc/profile will work too for interactive commands. – Michał Šrajer Mar 21 '12 at 11:35
  • @MichałŠrajer Yes, could've used /etc/environment (or ~/.pam_environment) too, but either will work equally well for this case, since both files are evaluated during login. – geirha Mar 21 '12 at 15:34
  • Agree. Your answer was correct. (+1) I just wanted to mention about some convention which is good to follow, and some people might not be aware of. – Michał Šrajer Mar 22 '12 at 10:44
  • I was specifically asking about option b, not about /etc/environment. – Thufir Mar 22 '12 at 23:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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