Home Linux How to create a symbolic link in Linux?
 
 
 

How to create a symbolic link in Linux?

PDF Print E-mail

What is a symbolic link?

A symbolic link is a special file that points to another file on the system. When you access one of
these files, it has a pathname stored inside it. Use this pathname to advance to the file or directory on the
system represented by the pathname stored in the symbolic link.

How to create a symbolic link?

Create a symbolic link with the ln command with the -s option

Syntax:  ln -s source destination

Explanation: source is either the absolute or relative path to the original version of the file, and destination is
the name you want the link to have.

Example: $ ln -s /home/httpd/html/site /home/peter/public_html

Explanation of Example: Creates a link to my home directory to my web files. If there's an error an error message will come up while atempting to create a symbolic link, and if successful no output will be displayed.

+/-
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!