I've got an external harddrive that I'd like to auto-mount. It will be present most times when my laptop boots. Where is the "correct" place to mount it?

  • /media/my-hd: Will litter /media with an empty folder when the hard-drive was not mounted.
  • /mnt/my-hd: I've heard that /mnt itself is supposed to be used as a temporary mount point. This happens, for example, during the Arch installation process.
  • 2
    If you use a udev rule to automount, there won't be any empty folders "littering" /media when the drive is unmounted... – jasonwryan Jul 9 '12 at 19:56
  • You could certainly make the mount point directory mode 0500 owner root:root, and the root directory on the drive something like 0755 owner you:users. That would largely ensure that you don't accidentally save things there when the drive is not mounted, and wonder where they ended up... – a CVn Jul 10 '12 at 9:32

The recommendation in the Filesystem Hierarchy Standard is that /media contains subdirectories for mount points of removable media. There are two conflicting traditions about /mnt: some consider it a mount point, whereas others consider it a directory for mount points. The FHS requests that distributions leave /mnt alone, so that the administrator can do what they like with it, and set up mount points under /media. System installation is a special case: it's a dedicated system, so it doesn't need to worry about competing conventions.

If you use an automounting script (such as an udev rule as suggested by jasonwryan — see How to get my USB key to auto mount), it can take care of creating the mount point. But there's no harm in having the mount point all the time.

  • I'm having a similar situation, that differs in that the system in question is a server running from microSD, having an external hard drive as a larger storage for non-system files, and the mount is pretty much fixed/permanent. My intention is to soft-link appropriate files and directories under, for example, /srv as I see fit. I think that your answer clears up my problem, and I assume that the correct mount point is under /media. In case I've misunderstood or you have something to say about this, let me know and I'll write a question and notify you about it so you can give a proper answer. – montiainen Oct 11 '14 at 9:50

TL;DR /mnt/my-hd

The Linux Filesystem Hierarchy conventions are documented over at tldp.org.

The /media entry reads,

Amid much controversy and consternation on the part of system and network administrators a directory containing mount points for removable media has now been created.

Your hard drive isn't removable media, so it should be mounted under /mnt.

That being said, it really is up to you. On a personal system, it really doesn't matter!

  • 1
    This answer makes no sense: the distinction between /mnt and /media is not about removable vs non-removable media. Besides we're talking about a removable media here. – Gilles 'SO- stop being evil' Jul 9 '12 at 22:28

Your Answer

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

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