What is Symbolic Link(symlink)?

Su Bak
3 min readSep 4, 2023
Photo: Markus Spiske by Unsplash

When you use Linux, you hear the word Symbolic Link.

So what is this Symbolic Link?

A Symbolic Link is a file that points to another file or folder(directory) on Linux. It similar to a shortcut in WindowsOS.

Symbolic Link is abbreviated as symlink, and is also called Soft Link, one of the types of links on Linux or Unix.

Just like the name Soft Link, there is also a Hard Link. Hard Link is also similar to shortcut, but different from Soft Link.

Let’s look at the difference between these two.

Hard Link

The Hard Link acts as a copy of the selected file. So even if the original file is deleted, the hard link to the file still contains the data for that file, so you can access the data.

If you create a Hard Link, it has the same inode number as the original file and does not allow hard link to the directory(except superuser is possible).

Soft Link

The Soft Link acts as pointers to file name. Therefore, if the original file/directory is deleted or moved, the Soft Link points to a file/directory that no longer exists and become inoperative.

--

--

Su Bak

Backend Developer. Mainly use JavaScript but try not to have language constraints. Always trying to acquire new knowledge