Difference between soft and hard links

In this article we will see the main difference between soft link and hard link

1. inode number:  

Source file and Soft link file are having different inode number

Source file and Hard link file are having same inode number

2. Upon deleting source file:

Soft link file cannot be accessible when source file is deleted

Hard link file still can be accessible when source file is deleted

3. Link on Directory:

Soft link can created on both file and directory

Hard link can be created only on files but not on directory

4. Access Speed:

Accessing speed is faster for hard link when compared to soft link