How to create a soft or symbolic link?

See man ln.

To create a symlink at /usr/bin/bar which references the original file /opt/foo, use:

ln -s /opt/foo /usr/bin/bar

You would need to apply the above command as root (i.e. with sudo).


The error is that you are writing the command wrong. The correct way is

ln -s /<full>/<path>/<to>/<file> /usr/local/bin

http://ubuntuforums.org/showthread.php?t=2001697


If the 'p4v' executable is at /opt/bin/p4v, you can simply run:

sudo ln -s /opt/bin/p4v /usr/bin/p4v
sudo chmod ugo+x /usr/bin/p4v

It would be better to add /opt/bin (or wherever the executable is) to your path:

echo "export PATH=\$PATH:/opt/bin" >> ~/.profile
reset