HowTo: Create a Link to a File or a Directory in Linux
A symbolic link, also known as a soft link, is a special kind of file (entry) that points to the actual file or directory on disk (like a shortcut in Windows).
Symbolic links are used all the time to link libraries and often used to link files and folders on remote NFS-mounted filesystems.
The ln command is a standard Linux utility used to create links.
Below you'll find how to create symbolic links to files and folders from the Linux command line.
Create a Link in Linux
Use the following syntax to create a symbolic link in Linux:
$ ln -s <TARGET> <LINKNAME>
Create a Link to a File
Create a symbolic link to a file:
$ ln -s /path/to/file /path/to/symlink
Create a Link to a Directory
Create a symbolic link to a directory:
$ ln -s /path/to/dir /path/to/symlink