Differences between a hard link and symbolic link?

Angui Clavijo Gutiérrez
2 min readFeb 6, 2021

Hard link and Symbolic link are differents methods to refer to a file in the hard drive. They are the pointers to files or directories. To use links, we must have inode.
Inode or index node is the data file structure on a filesystem. It is the place which stores file information. Users recognize a file by the filename and the system recognizes the file by its inode. Each file includes only one inode.

Definition Inode:

Inode is a database that describes the file/directory attributes such as metadata and the physical location on the hard drive.

Definition Hard Link:

The hard link is direct reference to a file via inode, too associate two o more files sharing the same inode and copy exact of data and permissions owner.

Linux implements hard link:
link() This command created files whit hard link
stat This command can reveal how many pointsto given file
ls-l This command show the link count.

Microsoft Windows, only NTFS implements hard links:
CreateHardLink() This command created files whit hard link
DeleteFile()This command delete file whit hard link
ls-l This command show the link count.

Definition Symbolic Link:

Symbolic link or soft link is a term for any file that contain a reference to another file or directory in the form absolute path.

Linux implements hard link:
ln -s target_path link_pathThis command created files whit symbolic links
target_path This command is the relative or absolute path which the symbolic link should point.

--

--