What is the difference between a hard link and a soft link?

A hard link is another directory entry pointing to the same inode, so it shares data and permissions and survives deletion of the original name. It cannot cross filesystems or point to directories.

A soft (symbolic) link is a small file that stores a path. It can cross filesystems and point to directories, but breaks if the target is removed.

bash ln file hard ln -s /path/file soft ls -li same inode number = hard link