In Linux system, you can use ln
Command to create soft links. The specific operations are as follows:
ln -s /path/ to /original/ file /path/ to/symlink
among /path/to/original/file
Is the original file path to create the soft link, /path/to/symlink
Is a soft link path. After executing the above command, a new soft link will be created under the specified path.
Note that when creating soft links, you need to add -s
Parameter to create a symbolic link. If this parameter is not added, a hard link will be created.
For example, suppose we want to create a user named myfile.txt
's soft link, pointing to /var/log/myfile.log
File, you can execute the following commands:
ln -s /var/ log /myfile.log ~/my file .txt
After the above command is executed, a myfile.txt
's soft link, pointing to /var/log/myfile.log
File.