Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It seems to me that having both /mnt and /media is a little redundant. Is there any tangible difference between the two that I'm not aware of?

Is there a standard that most people follow for where to mount things, e.g. use one for certain types of devices, or is this completely subjective?

share|improve this question
add comment

4 Answers

up vote 37 down vote accepted

The new standard is that /media is where the system mounts removable media, and /mnt is for you to mount things manually.

See the filesystem hierarchy standard (FHS) for details.

share|improve this answer
    
By the way, that website link is unclear about the purpose of /mnt in this context. –  djangofan Dec 1 '11 at 16:01
    
It says /mnt is for the system administrator. This implies that /mnt should not be used by the system itself. So if your computer automatically mounts a CD or DVD, it should mount it in /media, not /mnt. –  Mikel Jan 26 '12 at 1:23
    
I certainly agree with that (with you), but the article didn't explicitly say that. –  djangofan Jan 30 '12 at 17:32
    
if /mnt is for temporary and /media is for removable where should permanent non-removable devices/partitions be mounted. i.e. an internal HDD which is formatted as NTFS but needs to be automounted at startup? –  Caltor Oct 17 '12 at 13:48
    
Without re-reading the spec, I'm pretty sure that since nothing else should use that drive unless explicitly pointed there, you can mount that drive's partitions anywhere you like, e.g. /data or /a. –  Mikel Oct 18 '12 at 13:05
add comment

/mnt was already accepted as a place to manually and temporarily mount external media. The /media directory was created as a place under which multiple media, external or otherwise, could be automatically mounted.

share|improve this answer
    
I can't help but notice that your answer and kiswa's answer are exact opposite. So, who is right?? The website Mikel provided isn't clear enough. –  djangofan Dec 1 '11 at 16:02
1  
@djangofan, mine ;) –  psusi Dec 2 '11 at 2:29
add comment

As I understand it, /media is for mounting things like optical drives and other temporary media, where /mnt is usually for permanently attached storage (generally internal disks).

Of course, you can also mount a device anywhere you want... the /mnt and /media directories are more conventional though.

share|improve this answer
add comment

Another important difference not mentioned yet is that devices mounted under /mnt will not appear in Nautilus' left pane, whilst those mounted under /media (as well as auto-detected devices that are not mounted yet) will.

So for example, if you don't want a certain partition to appear in the "Devices" subsection of Nautilus' left pane, you should create a subdirectory for it under /mnt, write an entry for said partition in your /etc/fstab (or do it through the Disks utility) and assign the newly created directory as its mount point:

/dev/{block_device_name)   /mnt/{descriptive_name}   {fs_type}   {mount,options}  0 2

Even better, add the noauto mount option in fstab/Disks and then your partition won't appear in Nautilus nor will it be mounted (preventing accidental mess with its files)! So for example, in the case of a dual-boot with Windows you could have:

/dev/sda1   /mnt/win7   ntfs-3g   rw,user,noauto,gid=100,uid=1000,nls=utf8,umask=002   0 0

in your /etc/fstab, and hence have your Windows partition not showing up in Nautilus (but still accessible through the mount command if you ever need it).

Here is a screenshot I made with a liveUSB, showing all three cases: Nautilus displaying unmounted/mounted devices that go to /media but not to /mnt

  • auto-detected devices not mounted ("16 GB Volume" /dev/sdb1)
  • devices mounted on a /media subdirectory and showing up in Nautilus ("iso" /dev/sdb2)
  • my Windows partition /dev/sda3 mounted on /mnt but not showing up in Nautilus left pane (it would be the same if it wasn't mounted since I have an entry for it in my fstab).

On the contrary, I want my share data partition to show up in nautilus, so I assigned a /media mount point to it and set the "auto" mount option, so I can just click on "Data" and access it from the GUI.

To me this is THE big difference between those two directories, that I learned about when trying to do just what I explained ;-)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.