How to Create softlink with ln command on Linux

Related Articles

Symlink, also called softlink, is a symbolic path indicating the abstract location of another file. In addition, a softlink files has the same role as a Windows shortcut. In this post, i will show you on how to create softlink or symlink on linux server. This steps has been tested on linux CentOS 6.2 x86 server.

Some idea on to differentiates softlink and hard link :
A softlink can be used across files systems. A hard link increases the link count. When you create hard link you can remove the original file without losing data.

To create symlink, simply run this command :

ln -s [target directory or file] [symlink shortcut]
[root@centos62 ~]# ln -s /public/index.html /home/ehowstuff/index.html

After creating the symbolic link above, /public/index.html will point to /home/ehowstuff/index.html.

As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. Jumping through archives page to read more articles..


Skytech is a part time blogger that has over 6 years experience in servicing, repairing and configuring computers and administering the server systems.

Related Articles

  • Pingback: Simplest Way of Setting up Google Authorship Markup In Blogger Blog | Nigeria Communication Guide

  • stephane

    Hi !

    I wanna add an external storage to my linux 6.4 centos server ( ZPANEL ), not really familiar with linux disk formats and how to move the public/html files…

    How do i move the public/html files ( website files ) to point to my external drive ?

    I will format the external drive in wich structure ? ( i Know that Linux has plenties… and not really really clear for me as i mostly used pc’s and mac’s in the last 20 years… )

Powered by WordPress · Designed by Theme Junkie