How to create symbolic links for Linux systems

  
                

Linux under the symbolic link is what we usually call soft links, and hard links are different (see how the system home to identify Linux soft links and hard links), the following small series will give you a brief introduction to Linux Create a symbolic link.

hard links: An extra entry is created for the file. When used, there is no difference from the file; when deleting, only the link will be deleted, and the file will not be deleted;

The limitations of the hard link: 1. Cannot refer to files other than the file system itself, that is, cannot refer to other partitions. File; 2. Unable to reference directory;

Operation: ln file link, link file only;

symbolic links: Overcoming the limitations of hard links, similar to shortcuts, Use the same as a hard link.

If you delete the file first, it will become a bad link (broken), ls will be displayed in a different color (Ubuntu, red);

Operation: ln -s item link, can link file and directory;

Figure:

Linux is to create a symbolic link above method introduced because of the limitations of hard links, symbolic links are able to overcome the limitations of hard links, So it is necessary to create symbolic links for Linux systems.

Copyright © Windows knowledge All Rights Reserved