Skip to main content
InterviewHubPRO
Section Overview
Q8

Question 8 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

16%
Linux OS Internals (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the difference between a Hard Link and a Soft (Symbolic) Link?

junior Levellinux-osBasic

In Simple Words:

  • Hard Link (ln file link): Creates an additional directory entry pointing to the exact same Inode number:
    • Shares the same disk blocks.
    • If you delete the original file, the data is still fully accessible via the hard link!
    • Cannot span across different filesystems/disks, and cannot link directories.
  • Soft Link / Symlink (ln -s file link): A special small file that contains a string path pointing to another file:
    • Has its own unique Inode number.
    • Can cross filesystems and link directories.
    • If the target file is deleted, the symlink breaks ("Dangling Symlink").