We’ve recently started creating some various tutorials and guides for Linux-based systems. Our latest one was how to install Linux Mint, but this time around, we’re going to be showing you how to create a symlink or Symbolic Link in Ubuntu using the Terminal. It’s a very easy process, and it might just make life a little easier for you.
What is a Symbolic Link?
The first important thing to know is that there are hard links and symbolic links. A hard link is a file with multiple names, which often consists of multiple copies of the same file. If one of these “hard links” is deleted, that file will cease to exist. A symbolic link is different in that it is a file system entry that points to a file name and file location. Unlike a hard link, getting rid of a symbolic link will not remove that original file. The symbolic link will simply just stop working, but you’ll still have that original file where you left it.
So, why might you want to create a symbolic link? A symbolic link is essentially a shortcut to the original file, except that it’s actually a lower-level pointer written into the file system on your hard drive. It’ll actually make it look like the linked file is actually there, but it’s still pulling data and other information from the original file location. It just makes things a little more seamless.
How to setup a Symbolic Link
A primary reason to use symbolic links is to extend the functionality of certain applications, such as Dropbox or local email applications. Now, creating a symbolic link is actually really easy! First, you’ll need to open up the Terminal. To do this, simply hold down Ctrl + Alt + T. Alternatively, you could click on the Ubuntu icon at the top left corner of the screen, type in “Terminal” and simply select the icon.
Once the Terminal is open, you can use the command ln -s [source] [destination] to create a symbolic link, with [source] and [destination] being the path to the file you’re trying to create a symbolic link with.
If you don’t want to use the Terminal, with most things you can simply click on the file or folder and select “Link to Desktop” or “Make Link.” This’ll create a symbolic link on your desktop to a certain file without you ever having to touch the Terminal.
As far as actual real-life applications go, this could be useful if you simply want to create a quick reference or shortcut to a file on your desktop. This could also be useful for, say, dual-boot users. If you’re running Windows and Linux, and have something like Mozilla Thunderbird on your computer and don’t want to re-download all those emails on Linux, you could create a symbolic link that points to the original files on Windows.
There really are some neat applications for symbolic links! If you need any additional help or have some feedback, be sure to leave a comment below or join us over in the PCMech Forums!