Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

Create a symlink

How to create a symlink on Linux Server :

Command :

ln -s <destination> <linkname>

If the desired link filename is the same as the destination’s filename, and the current working directory is the desired location for the link, then you only need:

ln -s <destination>

If you are trying to create a link to a directory?

I’ve got a directory called /usr/local/test/installed. In this dir there is the sub-dir “spf-2.3.4”
I want to create a link in “/usr/local/test/installed” called “spf” to “spf-2.3.4.”

cd  /usr/local/test/installed
ln -s  spf-2.3.4  spf

The syntax is the same whether the link is to a file or a directory.

Share on Twitter
Share on Facebook