How to delete or change a currently developed symbolic link?

I am working with my task making use of network simulator2. I mounted it and also every little thing is great. I tried to create a symbolic link in between this installment and also /usr/bin, so I can invoke the software program by running ns from the command - line. Particularly, I ran :

sudo ln -s /home/vinaychalluru/ns-allinone-2.34/ns-2.34/ns /usr/bin/ns

which created the list below result :

ln: creating symbolic link '/usr/bin/ns': File exists


How can I delete the currently developed symlink or can I change it with any kind of various other commands?

0
2019-12-02 02:47:47
Source Share
Answers: 3
sudo rm -r /usr/bin/ns

sudo ln -s /home/vinaychalluru/ns-allinone-2.34/ns-2.34/ns /usr/bin/ns
0
2019-12-03 04:17:12
Source

To include in all solutions over, a symbolic link can be dealt with as a normal documents in a lot of cases (the link, not the target).

rm on a symbolic link will certainly remove it. If the link is possessed by origin, you will certainly require to sudo.

You need to have the ability to rm /usr/bin/ns or instead sudo rm /usr/bin/ns do not neglect possession.

0
2019-12-03 04:15:01
Source

ln has -f button that 'pressures' a symlink to be developed whether it exists or otherwise.

sudo ln -sf /home/vinaychalluru/ns-allinone-2.34/ns-2.34/ns /usr/bin/ns
0
2019-12-03 04:07:12
Source