[Linux]: create soft link under Linux (shortcut)

Time:2021-1-21

In Linux, we can also create a shortcut, which is exactly the same as in windows. We can directly enter the directory of the original folder or the original file without clicking the original file. The command to create a soft link (shortcut) is as follows:

ln -s exam exam2

This shows that we want to create a shortcut to exam, and the name of the shortcut is exam2. When no shortcut is created, the files in our home directory are as follows:

 

 

After we create it with the ﹣ ln command:

 

So how do we know which files are shortcuts and which links are original files? Use LS command to observe the color of the file directly on Ubuntu. If it is dark blue, it is the original file, red is the compressed package or archive file, and light blue is the shortcut. However, we generally can’t use Linux system directly. In actual development, we use other remote login methods to log in. Therefore, we can directly use LS – L command to view all the file attributes under the current file directory. If it is a shortcut, it will show an arrow “– >” pointing to the original file, as shown in the following figure:

 

You have to understand!

Recommended Today

Choose react or angular 2

Original addressChoosing between React vs. Angular 2The following is the translation of this article, which can be used at your choiceReactperhapsAngular2We need to help when we need to. React has become a cool representative in 2015, but angular.js has changed from a front-end framework that people love to a terrible devil (and not so terrible…) […]