What is the advantage of using symbolic link?

7,232

A symbolic link is a special file type whose data contains a filename. This filename is essentially a "soft link" to another file. Whenever the kernel encounters a symbolic link file type, it reads the filename in the data part of the file and goes to that filename. It's as if the Kernel traverses the namespace for the user. Symbolic links are nice in that they are links at the namespace level rather than at the block level (like hard links)1

1Source:Read Seas

Symbolic links can do 2 things:

  • Link to files across file systems (since that it's an indirect link)

  • Link to directories

Symbolic links are done using the ln command with the -s option.

Share:
7,232

Related videos on Youtube

Ant's
Author by

Ant's

Updated on September 18, 2022

Comments

  • Ant's
    Ant's over 1 year

    Possible Duplicate:
    What is different symbolic link with hard link after unlik?
    Symbolic links vs Hard links

    I'm a new user to Ubuntu. And I do install some software. I see many tutorials uses symbolic link to a directory. Like this :

    ln -s
    

    Are there any advantages of using this way? Or it is the way it should be done?

    • psusi
      psusi almost 12 years
      Compared to what? Question is too short and vague to be answerable.
    • mikewhatever
      mikewhatever almost 12 years
      Indeed. You need to clarify the question.