I am installing p4v in /opt
, but /usr/bin
is on my path. Is it possible to create a soft or symbolic link for p4v from /opt
to /usr/bin
, so I can just type "p4v" since /usr/bin
is in my path?
I am installing p4v in /opt
, but /usr/bin
is on my path. Is it possible to create a soft or symbolic link for p4v from /opt
to /usr/bin
, so I can just type "p4v" since /usr/bin
is in my path?
See
man ln
.To create a symlink at
/usr/bin/bar
which references the original file/opt/foo
, use: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
http://ubuntuforums.org/showthread.php?t=2001697
If the 'p4v' executable is at /opt/bin/p4v, you can simply run:
It would be better to add /opt/bin (or wherever the executable is) to your path:
Check the software location by this.
for example
output will be this.
To create the soft link. for example you want to create the soft link for
skype
on your desktopFor more information about
ln
.or
This template was more helpful for me than the above answers. Probably not more correct, just less obfuscated:
Just replace the parts in
<>
'sNote, this works if you both nodes are below you in the same tree. You can use relative notation
If it is saying
target is not a folder
, it means there are spaces in your folder names eg:New Folder
has a spaceYou need to edit the path and add a backslash
\
after every space in the pathseg:
I have found that it is easier to go to where you want the link to be and then create the link using
sudo ln -s /path/to/source/file
, than doingln -s target source
.So in your case I would do
cd /usr/bin
thensudo ln -s /opt/bin/pv4
. The other way has not been working in my case.