thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Commonly confused · Systems & Data Center

Hard Link vs Symbolic Link: What's the Difference?

A hard link is another directory entry pointing to the same inode, so it is indistinguishable from the original and survives deletion of the original name. A symbolic link is a separate small file containing a path to the target, so it breaks if the target is moved or deleted.

vs

Symbolic (Soft) Link

Hard LinkSymbolic (Soft) Link
Points toThe inode (data) directlyA path name
Inode numberSame as originalDifferent, its own inode
Original deletedData still accessibleLink becomes broken (dangling)
Across file systemsNoYes
Link to directoriesNo (not allowed for users)Yes
Commandln target linknameln -s target linkname
ls -l showsRegular file, link count increasesl type and -> target
Remember it

A hard link is a second name for the same file; a symlink is a signpost to a name.

Exam tip

Expect questions on which link survives deleting the original (hard), which crosses partitions (symbolic), and the -s flag. ls -i shows matching inode numbers for hard links.

Tested on

More Systems & Data Center look-alikes