How to Create a Symlink in Linux: A Complete Guide
Symbolic links are one of Linux's most useful filesystem features — and once you understand how they work, you'll find yourself reaching for them regularly. Whether you're managing config files, organizing project directories, or pointing software to the right location, knowing how to create and manage symlinks is a core Linux skill.
What Is a Symlink?
A symbolic link (symlink) is a special file that acts as a pointer to another file or directory. Think of it like a shortcut on Windows or an alias on macOS — except symlinks are deeply integrated into how Linux handles files at the filesystem level.
When you access a symlink, the operating system automatically follows the pointer and gives you the contents of the target. To most programs, the symlink is invisible — they just see the file or directory it points to.
This is different from a hard link, which creates a second directory entry pointing to the same underlying data blocks. Symlinks can span different filesystems and can point to directories; hard links generally cannot.
The Basic Command: ln -s
Creating a symlink in Linux uses the ln command with the -s flag (for symbolic):