In practice, hard links and symbolic links (soft links) are difficult to distinguish, but they are indeed different: hard links can only be applied to files, not directories, in addition, it cannot be used across file systems (that is, partitions). Symbolic Links can be used for files and directories and cross-file systems (partitions). This is their difference in application; underlying differences: When we create a hard link to a file, the hard link uses the same inode number as the file, the number of inode connections in the original file has changed from 1 to 2. In fact, hard links and files use the same inode, but the number of inode connections has increased, and deleting files does not affect hard links, the number of hard-linked inode will change from 2 to 1. Let's take a look at the demonstration: when creating a soft link to a file, the soft link will use a new inode, therefore, the inode Number of the soft link is different from the inode Number of the file. The inode of the soft link stores the path pointing to the file, and deletes the file. The soft link cannot be used, because the file path does not exist, when we create this file again (the file name is the same as the previous one), the soft link will point to this file again (the inode number is different from the previous one ), hard links won't be affected. See the demo: