Introduction to soft links, hard links, and linux links in linux
In linux, the file stored in the disk partition is assigned a number no matter what type it is, called the index node number inode.
Create a hard link directly using ln, and create a soft link using ln-s.
Soft link: Creates a directed file for the source file, which is similar to the shortcut of windows. The inode Number of the link is different from the inode number of the original file, which can be viewed through ls-I. Because soft links direct to the original file, when the original file is deleted, soft links do not actually work. However, soft links can be used across platforms.
Hard link: a hard link is actually an alias of the original file. It has the same inode number as the original file. When one of them is modified, the other is also changed. Hard links cannot be used across file systems.