Create a shortcut in Linux to link directly to another directory

Usually after logging in to the base server remotely, the default is to log in to the working directory /home/IC.
However, our own working directory is far away, and we need to go through multiple jumps to reach our own working directory.
那在Linux里可不可以建立一个快捷方式,直接链接到另一个目录呢。

We can use the lncommand here :
its function is to establish a synchronized link for a certain file in another location;
the most commonly used parameter of this command is -s, the specific usage is:

 ln -s [源文件或目录][目标文件或目录]

When we need to use a file or folder in other directories, we just need to lnlink it with commands in other directories .
E.g:

ln -s /home/IC/Projects/Lab1  /home/IC/test

Now under the directory /home/IC/test, /home/IC/Projects/Lab1/a shortcut to the folder is created .
That is /home/IC, type in the directory and you cd testcan jump directly to it /home/IC/Projects/Lab1/.

Guess you like

Origin blog.csdn.net/qq_35547861/article/details/115343323