Links create references to files in different locations without copying data.
Symbolic (Soft) Links
ln -s /path/to/original /path/to/linkLike a shortcut. If the original is deleted, the link breaks.
Hard Links
ln /path/to/original /path/to/linkBoth names point to the same data on disk. Deleting one doesn't affect the other.
When to Use What
- Symlinks: Linking to directories, linking across filesystems, config file management
- Hard links: Backup systems, space-efficient copies
List Links
ls -la # Shows symlinks with ->\nfind / -inum 12345 # Find all hard links to an inode