There is probably not one clear answer for this, and there are many instances where it doesn't particularly matter if a symlink target is relative or absolute.
It is probably a good idea to use a relative symlink if any of the following apply, because the link will remain valid in these situations:
- if the target is in the same directory tree and the whole tree could be moved
- If the target is in the same filesystem, and it gets mounted somewhere else in some future mount (perhaps in a rescue live environment or a container or on another system)
However an absolute link might be better if any of the following apply
- the target is in a radically different directory, where the right number of
../
sequences might not be clear
- you want to point to a very specific file that is not relative to the current directory (for example, a config file in /etc maybe)
- if you want to be very clear what file this points to, when a realtive link might turn into a maze of symlinks pointing to symlinks or targets that traverse symlinks to directories...