In an application, I need to find out where removable media is mounted. On Ubuntu, this happens in /media/username/ . On Arch, it is /run/media/username/ . On other systems, its just /media/ etc.

There seems to be no XDG environment variable for this path. So I wonder, is this standardized anywhere? The FHS only specifies that there must be a /media directory, not how to find out that directory.

  • 1
    On Arch, it depends entirely on the automounter you install: udisks or the newer udisks2; they use different directories... – jasonwryan Sep 22 '16 at 9:22
  • Oh, so this is enforced by udisks then. Thanks, I did not realize that. – dv_ Sep 26 '16 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.