Where should I mount my external harddrive?

6,259

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.

Share:
6,259
Saif Bashar
Author by

Saif Bashar

Updated on September 18, 2022

Comments

  • Saif Bashar
    Saif Bashar almost 2 years

    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.
    • Admin
      Admin almost 12 years
      If you use a udev rule to automount, there won't be any empty folders "littering" /media when the drive is unmounted...
    • Admin
      Admin almost 12 years
      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...
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 12 years
    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.
  • montiainen
    montiainen over 9 years
    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.