How to create symbolic link in Unix


create symbolic link, symbolic link, link, linux, computer tipsSymbolic link in *nix is just like a shortcut in Window. You can create a shortcut for script or directory. You can delete symbolic link anytime and it wont affect your link directory or files.

To create symbolic link is very easy, it’s just a line of command to create symbolic link in *nix. We use ln command to create symbolic link. Below are the explanation on how to use ln command

Advertisements

#ln -s [PATH_TO_SCRIPT] ./[SHORTCUT_NAME]

So for example, if I want to create a symbolic link “apachelogs” at myfolder to point to /usr/local/apache/logs folder then i’ll use the command below:-

ln -s /usr/local/apache/logs /home/myfolder/apachelogs

So you can try to create your own symbolic link now. 🙂

[tags]symbolic link, create symbolic link, window shortcut, linux shortcut, soft symbolic link, linux, linux how to[/tags]




Share this with your friends:-

7 Responses to “How to create symbolic link in Unix”

  1. Loki says:

    I want to know can i create symbolic link to call files in other machine (from nortal MPS box to other Nortal MPS box).?
    If possible please share the steps to do. Thanks in advance.

  2. chua says:

    Thanks Lenny for your explanation 🙂

  3. Lenny says:

    Symlinks are NOT the same as winblows short-cuts, you may think that if that’s your back ground.

    “short-cuts” are files that consume disk space and are full of rubbish.

    Symlinks don’t take up any space other than an inode entry and within that it points to the actual file, it’s a lot lower level and efficient form of a “short-cut”.

  4. dawn says:

    thanks a lot. helped me out for typing the long list of folders each time.

  5. sogua says:

    hi Santiago Panchi, if you are trying to link to a device then you need to create a script n make it auto run whenever you start your machine. If you are linking to a normal file, the symbolic link wont be missing whenever reboot.

  6. Santiago Panchi says:

    Hello there
    I have a question. I created a symbolic link to a device.
    “ln -s /dev/ACM0 /dev/ttyS96” in Ubuntu hardy. My problem is when I restart the computer the symbolic link disappears. How can I solve this problem?
    With kind regards

    Thanks for all

  7. […] How to auto start Apache during boot time – Linux By Techie Corner « How to create symbolic link in Unix […]

Leave a Reply