symbolic link to /opt
7,239
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.
Related videos on Youtube
Author by
Alexey Ce
Updated on September 18, 2022Comments
-
Alexey Ce almost 2 years
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?
-
NZ Dev over 4 yearsI cam here looking for how to create a sym link to opt. not really what I found :(
-
-
Michał Šrajer over 12 yearsto define systemwide environment it is better to set edit /etc/environment file. Anyhow, /etc/profile will work too for interactive commands.
-
geirha over 12 years@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.
-
Michał Šrajer over 12 yearsAgree. 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.
-
Alexey Ce over 12 yearsI was specifically asking about option b, not about /etc/environment.