A single file can have more than one hard link. What this means is that multiple filenames refer to the same file (that is, they are associated with the same inode number). However, you can’t make hard links across filesystems: All hard references to a particular file (inode) must be on the same filesystem. This is because each filesystem has its own set of inodes, and there can be duplicate inode numbers on different filesystems.
Because all hard links to a given inode refer to the same file, you can make changes to the file, referring to it by one name, and then see those changes when referring to it by a different name. Try this:
cd; echo "hello" > firstlink
cd to your home directory and create a file called firstlink containing the word “hello.” What you’ve actually done is redirect the output of echo (echo just echoes back what you give to it), placing the output in firstlink. See the chapter on shells for a full explanation.
cat firstlink
Confirms the contents of firstlink.
ln firstlink secondlink
Creates a hard link: secondlink now points to the same inode as firstlink.
cat secondlink
Confirms that secondlink is the same as firstlink.