↑↓ move Enter open Esc close

Symbolic link (symlink)

A small file containing a path, resolved on every access.

A symbolic link is a tiny file whose content is a path to something else. Every time you open it, the system reads that path and follows it. Because it stores a path rather than a reference to an inode, a symlink can cross filesystems, point at directories, and even point at something that does not exist yet: a "broken" link.

Symlinks power two ubiquitous patterns: dotfiles kept in a git repo and linked into place, and deployment schemes where /opt/app/current points at the active release, so switching versions is one atomic link change.

See it in practice

$ ln -s /opt/app-2.4.1 /opt/app/current && readlink -f /opt/app/current

Creates a pointer and then resolves it. Switching releases is one atomic link change.

Where you'll meet it

Errors that come down to this concept: No such file or directory

Learn these concepts by typing them: the interactive course builds them up lesson by lesson in a real simulated shell.