whatis symbolic-link

Symbolic Link (Symlink)

Also known as: symlink, soft link, ln -s

A special file that points to another path by name, like a shortcut. Created with ln -s target linkname.

What Is a Symbolic Link (Symlink) in Linux?

A symlink stores a path string. Opening it transparently opens whatever the path points to, across filesystems and to directories alike. If the target is moved or deleted, the link breaks and points nowhere.

ls -l shows symlinks with an l type and an arrow to the target, and readlink -f resolves the final destination. They are used everywhere, from /bin -> usr/bin to selecting default versions of tools.

Example

ln -s /opt/app/current/bin/app /usr/local/bin/app
readlink -f /usr/local/bin/app