How to link a local file in Obsidian?

I haven’t tried the case that the linking file is outside the vault folder, because the vault folder is in a cloud drive that is able to sync across different computers. If the local link is hardcoded as an absolute directory, you have to ensure all your sync dirs have the same location at different working pc, it is really big trouble to me.