Directory hard links in Linux

Last modified on July 24, 2026 • 1 min read • 153 words
Recursive data structures are dangerous and therefore, directory hard links are forbidden in Linux.
Directory hard links in Linux
Image by Michael Jeltsch

Directory hard links in Linux are forbidden because they would:

  • create cycles in the directory hierarchy.
  • break the assumption that directories form a tree.
  • complicate deletion and reference counting.
  • make filesystem traversal and maintenance much harder.

Instead, Linux allows hard links for regular files and symbolic links for both files and directories. To emulate something similar to directory hard links, you can mount any file system path into any other directory (bind mount). However, you need to be careful because you can get the same problems as with directory hard links, namely circular and thus infinite file paths…sudo mount --bind /home/user/Documents/Desktop/ /home/user/Desktop/. Such a link disappears after a reboot. If you want to make it permanent, you can add the mount to /etc/fstab:/home/user/Documents/Desktop/ /home/user/Desktop none bind. Some say this does not work with LVM, but at least, on Ubuntu 20.04 it does. Obviously, this entry should be at the bottom of the fstab!