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 Learn more about Symbolic Link (Symlink)
- Symlinks vs Hard Links Explained: The ln Command and How Links Actually Work Symbolic links point to a path; hard links point to the data itself. Understanding the difference explains why one survives renames, why the other breaks, and what ln -s actually creates.
- realpath and readlink Explained: Resolving Symlinks and Relative Paths Turn a messy relative path full of symlinks and dot-dot components into the one canonical absolute path. Essential whenever a script must know where it really is.