
You probably know about the “ln” command to create a new link to an existing file. You probably know about “ln -s” to create a symbolic link. But did you know about “ln -rs” to easily create relative symbolic links? Relative links are often preferable to absolute ones, because that way they stay valid if the whole containing directory tree is moved to a different location (e.g. as the result of a bind mount). But typing the right number of “../” prefixes can get quite fiddly. And if you want to rely on autocomplete to help, you have to change directory to the destination where the symlink is to be created. Instead, a simpler way is to use “ln -rs”, then use autocomplete from wherever you are to get to the right source file/directory, and the ln command will automatically convert the resulting path, whatever it might be (either absolute or relative to your current working directory) to a suitable relative one based on the destination for the link. <https://manpages.debian.org/ln.1.en.html>