Create a second filename that points to the identical file data on disk without duplicating bytes. 16.11.2025 | reading time: 2 min Want two filenames that behave like the same file? Create a hard link: both names reference the same inode so edits via one name affect the other and the data remains until all links are removed. Quick demo ```sh $ echo "Hello Hard Link" > original.txt $ ls -li original.txt 100663297 -rw-r--r-- 1 user group 16 Sep 1 12:00 original.txt $ ln original.txt hardlink.txt $ ls -li original.txt hardlink.txt 100663297 -rw-r--r-- 2 user group 16 Sep 1 12:00 original.txt 100663297 -rw-r--r-- 2 user group 16 Sep 1 12:00 hardlink.txt $ rm original.txt $ cat hardlink.txt Hello Hard Link ``` Behind the scenes Look at the inode: a hard link is merely an additional directory entry pointing to the same inode; the inode stores the data blocks and the link count increases with each link, and only when the link count drops to zero does the filesystem reclaim the blocks. Practical limits and tips Hard links cannot span filesystems and normal users cannot create hard links to directories; use `ln` to create links, consider `ln -f` to overwrite and `ln -v` to get feedback, and remember that tools like `rsync --link-dest` exploit hard links to build space-efficient backups. Why this matters Use hard links to save space when identical content must appear under multiple names, to preserve file access while rotating or removing a pathname, or to implement snapshot-style backups without copying data; check link counts and inodes regularly when debugging storage usage. Final note Try the demo on a disposable directory and observe inode and link counts yourself; then explore backup and deduplication workflows that leverage links for efficiency, and consider advancing your Linux skills with focused exam preparation at bitsandbytes.academy for certifications like CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage backup