Symlink

From MEPIS Documentation Wiki

Jump to: navigation, search

symbolic link (often shortened to symlink) consists of a special type of file that serves as a reference to another file.

Unlike a hard link, a symbolic link does not point directly to data, but merely contains a symbolic path which an operating system uses to identify a hard link (or another symbolic link). Thus, when a user removes a symbolic link, the file to which it pointed remains unaffected. (In contrast, the removal of a hard link will result in the removal of the file if that file has no other hard links.) Systems can use symbolic links to refer to files even on other mounted file systems. A symbolic link whose target does not exist is referred to as an orphan.

You can use either the command line or Dolphin file manager to create a symlink. (Or Konqueror for old versions of MEPIS)

Dolphin

  • Navigate to the file or folder (target) you want to use
  • Open another window or tab of Dolphin to navigate to the location where you want the symlink to be.
  • Drag the target file to the symlink location.
  • Select "Link Here" in the box that opens and you're done!
  • Change the Name if you want, and you have a symbolic link to the target file or folder which is still in its original location.

Command line The command to create a symlink is:

ln -s TARGET LINK_NAME

This command creates a link to the TARGET folder or file from the file LINK_NAME (that includes that location of the symlink).
For more info on the ln command, type in the address bar of Dolphin:

man:ln
Personal tools
In other languages