Symbolic Links

Relative Symlinks for Removable Media/Devices

Symlinks can be a useful and sometimes necessary part of working on the command line. They're often used with absolute paths, extending from either root directories or your user folder. If you're working on a removable disk, however, absolute paths might change depending on which user has the disk mounted. In this case, using relative paths for you symlinks is a great way to ensure they work regardless of who mounts them. Here's a look at how this can be done.

If you've ever used removable devices across multiple user profiles, you might have noticed that, once mounted, the path to the drive changes depending on user. Here's a quick example: suppose I have two users/profiles on a computer and one removable disk named "Extras". For each user, once the disk is mounted, the path to the disk would vary--like this: