Operating Systems 2018-05-24

Symbolic Links vs Hard Links: Key Differences on Linux

Understand the difference between symbolic (soft) links and hard links on Linux. Learn about inodes, how each link type behaves on deletion, and practical use cases.

Read in: ja
Symbolic Links vs Hard Links: Key Differences on Linux

Overview

This post summarizes the differences between symbolic links and hard links.

Prerequisites

What is a Symbolic Link?

touch a.md
ln -s a.md a_symbolic_link.md // Create a symbolic link
ls -i1 a.md a_symbolic_link.md // You can confirm that the inodes are different

What is a Hard Link?

touch a.md
ln a.md a_hardlink.md // Set a hard link
ls -i1 a.md a_hardlink.md // You can confirm that the inodes are the same

References

Tags: Symbolic Links Hard Links
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles