There are two types of Linux links, one called Hard Link and the other called Symbolic Link. By default, the ln command generates a hard link.
Hard to connect
Hard connection refers to connecting through index nodes. In Linux file systems, files stored in disk partitions are assigned a number, called an InodeIndex, regardless of their type. In Linux, it is possible to have multiple file names pointing to the same index node. In general, this connection is a hard connection. The purpose of hard links is to allow a file to have multiple valid pathnames, so that users can establish hard links to important files to prevent “accidental deletion” function. The reason for this is as described above, because there is more than one connection to the index node of the directory. Deleting only one connection does not affect the index node itself or the other connections. Only when the last connection is deleted will the file’s data blocks and directory connections be released. In other words, a file can only be deleted if all hardlinked files associated with it are deleted.
Soft connection
The other type of connection is called a SymbolicLink, or soft link. Soft link files have shortcuts similar to Windows. It’s actually a special file. In symbolic links, a file is actually a text file that contains information about the location of another file.