In Linux, there are two different types of links. A symbolic link is the most fl exible link type you can use. It points to any other file and any other directory, no matter where it is. A hard link can be used only to point to a file that exists on the same device.
With symbolic links, there is a difference between the original file and the link. If you remove the original file, the symbolic link won’t work anymore and thus is invalid.
A hard link is more like an additional name you’d give to a file. To understand hard links, you have to appreciate how Linux file systems work with inodes. The inode is the administration of a file. To get to a file, the file system reads the file’s inode in the file system metadata, and from there it learns how to access the block where the actual data of the file is stored. To get to the inode, the file system uses the file name that exists somewhere in a directory. A hard link is an additional file name that you can create anywhere in a directory on the same device that gives access to the same file system metadata. With hard links, you only need the original file name to create the hard link. Once it has been created, it isn’t
needed anymore, and the original file name can be removed. In general, you’ll use symbolic links, not hard links, because hard links have some serious limitations.
To create a link, you need the ln command. Use the option -s to create a symbolic link. Without this option, you’ll automatically create a hard link. First you’ll put the name of the original file directly after the ln command. Next you’ll specify the name of the link you want to create. For instance, the command ln -s /etc/passwd ~/users creates a symbolic link with the name users in your home directory. This link points to the original file /etc/
Resources : Red Hat® Enterprise Linux® 6 Administration
Real World Skills for Red Hat Administrators