Download Article
Learn how to make shortcuts to files and directories in any version of Linux
Download Article
In Linux, you can create symbolic links (symlinks) to point to other files and directories. These symlinks act as shortcuts, similar to icons on your desktop. This guide will teach you how to symlink in Linux, both to files and directories, and help you view and manage your symlinks.
Things You Should Know
- To create a symlink to a file, use: ln -s <source_file> <link_name>
- To symlink a directory, use: ln -s <source_directory> <link_name>
- To see which file or directory a symlink points to, use: readlink <link_name>
Steps
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
- If you omit the -s option in ln -s , you'll create a hard link instead. A hard link creates a mirror copy of the target file or directory instead of an alias. [1] X Research sourceThanks
- In most Linux graphical file managers, symlinks are marked with arrows.Thanks
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
About This Article
Thanks to all authors for creating a page that has been read 14,001 times.
Advertisement