What is the distinction between /media, /mnt and /run/mount

directory-structurefhsgnome

In FHS-2.3, we have /media that holds mount points for removable media such as CD-ROMs and we have /mnt that holds temporarily mounted filesystems.

On the other hand, we have /run/media and /run/mount. For me, the CDs and USBs are mounted on /run/media.

I don't see any clear distinction between them(/media, /mnt, /run/mount) . What are their differences?


I have seen similar trend (mount on /run/media) in fedora 20 – GNOME 3.10.4 and ubuntu 14.04.1 (installed on virtual box) with GNOME 3.10.4. But when I plugged in a USB flash (with auto-mounter script) on a system with Centos 6 and GNOME 2.28.2 it was mounted on /media

Best Answer

FHS v2.3 was released ten years ago. Some things have changed since then (including the introduction of /run1). About three years ago, the Linux Foundation decided to update the standard and invited all interested parties to participate.
You can view the v. 3.0 drafts here and the section that describes /run here.
The distinction between /media and /mnt is pretty clear in the FHS (see Purpose and Rationale), so I won't go over it again. Same for the purpose of /run - see links.

The Gnome story is yet another thing. Gnome uses underneath an application called udisks (replaced later by udisks2) to automount drives/devices. For quite a long time, udisks default mounts were under /media. In 2012 the devs decide to move the mounts to /run/media (i.e. a private directory). So the different behaviour you're experiencing there is caused by the different versions of udisks that each DE is using.

1: see
What's this /run directory doing on my system and where does it come from ?
What is this new /run filesystem ?

Related Question