Symlinks (Symbolic Links) are also known as Soft links, and they are widely used on Linux, as well as in other OS, in Windows they are called “shortcuts”, basically they are just small files acting as links to an actual file, you can have as many symlinks as needed and removing them doesn’t affect the actual file.
The following image shows a graphical representation of both the softlink vs the hardlink.
Main differences between Softlink and Hardlink are listed in the following image.
Sites-Available vs Sites-Enabled
One common use case of Symlinks is on web servers, I’ve come across with Debian based distros (Ubuntu) running either Apache or Nginx as web servers and both using a particular scheme to activate websites using the Sites-Available and Sites-Enabled model.
Under that model you can have several websites but only a few of them being served, that is quite useful if you have a website under development or just a website acting as backup.
The first thing you have to get when creating a Symlink in this case to enable a website under the Debian scheme is the path to the actual file, that is the link to the Virtual Host configuration file, in our example that file is called “website-example”.
Obtaining the path to the file is really an easy task using the WinSCP GUI, see image below.
If you want to speed up this step, then you can make use of the key combination Ctrl+Alt+C, once you have the path on the clipboard you can go to the folder “sites-enabled” to create the Symlink, just right click and select “New/Link“, see screenshot below.
Paste the file path and also the file name as follow.
That’s it your brand new Symlink has been successfully created.
Those of you who prefer doing things purely and always on the terminal can use the following CLI when creating Symlinks.
ln -s /etc/nginx/sites-available/website-example /etc/nginx/sites-enabled/website-example
Where to go next?
In case you want to go further on learning about WinSCP and its multiple useful tool you can take a look at the following articles.