Where should I mount my external harddrive?
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.
![Saif Bashar](https://i.stack.imgur.com/j5h9H.jpg?s=256&g=1)
Saif Bashar
Updated on September 18, 2022Comments
-
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 almost 12 yearsIf you use a udev rule to automount, there won't be any empty folders "littering"
/media
when the drive is unmounted... -
Admin almost 12 yearsYou 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' almost 12 yearsThis 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 over 9 yearsI'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.