Novice's Thoughts

Hard Links vs Symbolic Links

I always forget this symbolic link vs hard link difference. Here's a blog entry with examples so that I won't forget again.

Setup

Screenshot from 2026-01-04 21-38-00

Screenshot from 2026-01-04 21-39-49

Screenshot from 2026-01-04 21-40-51

The Questions

What is the difference between the two types of links other than the -> in the image? :)

Hard Link is like giving another name to the same file content. So a file content is actually deleted when all hard links are deleted. That is all the names.

Symbolic Link is on the other hand is like a shortcut to another file. When that file is gone, the link is broken.

The Great Destruction

Screenshot from 2026-01-04 21-45-03 Screenshot from 2026-01-04 21-45-13

You see the difference?

inode

See the inode where these links points to.

Screenshot from 2026-01-04 21-47-01