Soft-links & Hard-links

Alexander Rodriguez Pineda
2 min readFeb 9, 2021

In this blog I will explain the simplest way in which I understood what a hard-link and a soft-link are compared to Linux with the Windows operating system.

ARE THERE DIRECT ACCESSES IN LINUX?
The first thing we have to know is that in Linux there is no such thing as a direct access in Windows. In Linux the shortcuts are called links.

There are also two types of links, hard links and symbolic links. In the following sections we will explain and see in detail what they are and what we can use each of the types of links that we have just mentioned.

Hard link and soft link (simbolic link).

HARD LINKS, STRONG OR HARD LINKS
What are hard links?
To understand what a hard link is, the first thing we have to know is that in Linux each file and each folder of the operating system is assigned an integer called inode.

This inode is unique for each of the files and each of the folders. The information stored by each of the inodes of the different files and folders is the following:

The permissions of the file or folder.
The owner of the file and folder.
The position / location of the file or folder on our hard drive.
The creation date of the file or directory.
Etc.

Therefore the original files and the hard links will have the same inode and consequently both will be pointing to the same content stored on the hard drive. In this way, as you can see represented in the image, a hard link is nothing more than a way to identify content stored on the hard disk with a different name than the original file.

What is a symbolic or soft link?

Symbolic links are similar to shortcuts in Windows and are the links that all common users use on a regular basis.

We just saw that the hard links point to a file stored on our hard drive. In contrast, as you can see represented in the image, the symbolic links point to the name of a file and later the file points to content stored on our hard drive.

--

--