35

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

3
  • 3
    The /run/mount/ thing happens when you use some kind of auto-mounter script - it mounts the disk in a user-owned directory. /media and /mnt are root-owned usually - so there's that at least. Commented Dec 31, 2014 at 12:12
  • 1
    udisks2 mounts to /run/media and the older udisks mounts to /media... See also What is this new /run filesystem? Commented Jan 3, 2015 at 0:10
  • Why would I mount anything in root? That would require applications and Terminal sudo to be able to write to the. Why not just use home? I'm mounting a folder from local network. Commented Sep 28, 2019 at 9:05

2 Answers 2

18

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.

Excerpt:

/media : Mount point for removable media

This directory contains subdirectories which are used as mount points for removable media such as floppy disks, cdroms and zip disks.

/mnt : Mount point for a temporarily mounted filesystem

This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run.

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.

Excerpt:

/run : Run-time variable data

This directory contains system information data describing the system since it was booted. Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process.

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 is this new /run filesystem ?

0
2

FHS states that /media is for users and /mnt is for admins. Furthermore, it forbids adding user mounts into /mnt since that was a common practice before /media was created.

/run is the replacement for /var/run. Those directories are for changes made to the system since boot and should be cleared on each boot. Since mountable media is something that gets cleared on boots some utilities use /run.

It would be nice if a future FHS addresses these differences by mandating that media is moved to /run or that media is not put in /run. I'm hitting these on different systems too and I'll have to code around it.

Details at: http://www.linuxbase.org/betaspecs/fhs/fhs.html#mediaMountPoint

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.