Where should I mount my internal drive partitions?

As far as I searched on the internet, I came to know that

/Media = mount point for removable media that system do it itself ( usb drive , CD )

/Mnt = temporarily mounting anything manually

I can most probably mount anything wherever I want, but if that’s the case what’s the point of /mnt? Just to be organised I suppose.

TLDR

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?

Asking with the sole reason to know that, what’s the practice of user who know Linux well, unlike me.

I know this is a silly question but I asked anyway.

42 points
*

With Linux filesystem hierarchies you’re going to run into a lot of history, conventions, quasi-standards and simply deprecated implementations.

It’s a problem of “there’s no bad way to do it so all options are equally fine”. From this arose some “guidelines” about /bin and /usr/bin, /var, etc. but few strict rules.

For a long time there was no /media. In the '90s/2000’s you would mount your CD-ROM and floppies in /mnt (e.g. /mnt/cdrom, /mnt/floppy). That was awkward as we started wanting auto-mounted things and wanted to do it from user-space. So /media/username was created to allow you to mount things with your ownership.

If it’s something you want permanently mounted but not part of a pool you can put it under any location you like really. I like locations under /var as historically /var is used for things that “vary”. You could just mount it in your $HOME if it’s something you’re going to use as a user rather than with a service.

I have a “/exports” dir for NFS mounts (e.g. /export/media, /export/storage, etc.). Just keeps it tidy and in one location.

The important thing is to use a standard that works for you and makes sense. There’s not a lot of bad places to mount things. If “/mnt” makes sense for you then go for it.

permalink
report
reply
6 points

Thank You.

permalink
report
parent
reply
4 points

To piggy-back off of this, it’s not entirely uncommon to create another directory at root in enterprise environments, using /data or /application That said, I only do that for enterprise, for my personal computer, my distro defaulted to auto-mounting to a directory for each drive inside of /mnt, and I rather like that and intend to stick with it.

permalink
report
parent
reply
2 points

I know it is kinda frowned on but I like to use new directories at root to cut down on confusion as to where things are. Video storage for the NVR goes in /video, user data for Nextcloud goes in /data, etc. But I also keep everything in it’s own LXC so I don’t have one machine with 30 extra directories cluttering up the root.

permalink
report
parent
reply
35 points

Anything I add to fstab gets mounted in /mnt and removable drives get auto mounted to /media. Linux doesn’t care where you mount your drives, they can be mounted anywhere you want.

permalink
report
reply
11 points

Linux doesn’t care where you mount your drives, they can be mounted anywhere you want.

Thank You

permalink
report
parent
reply
27 points

Mount your internal disks to /D:, /E:, /F:, etc.

permalink
report
reply
6 points

🥇

permalink
report
parent
reply
16 points

It ultimately doesn’t actually matter because in many cases these things are convention and there is no real system-based effect. So while it would be especially weird if your distro installed packages into those directories, it ultimately doesn’t matter. Someone already linked the filesystem hirearchy. See how tiny the /media and /mnt sections are?

I put my fixed disks into subdirectories under /mnt and I mount my NAS shares (I keep it offline most of the time) in subdirectories in /media.

permalink
report
reply
1 point
*

fixed disks under /mnt

NAS in /media

Why ? that’s what I’m asking. Can’t you just put in the same folder and call it a day?

I put my fixed disk in /mnt

My Files, which are inside the partition mounted in /mnt/something has root as Owner. So When I try to move something to Trash, it’s not allowing me to do, Only perma delete. When saw properties it said owner is root.

Is it because mounted at /mnt?

Files under /media seems fine. files under /media says it’s owner is ‘me’

permalink
report
parent
reply
6 points

The answer to your question why is because I arbitrarily decided on that years ago. That’s basically all there is to it.

The answer to your file ownership problems I can’t answer, because I don’t have that happening. My files are mounted like so:

LABEL=BigHD /mnt/BigHD btrfs nosuid,nodev,nofail,noatime,x-gvfs-show,compress-force=zstd:1 0 0

permalink
report
parent
reply
3 points

The answer to your question why is because I arbitrarily decided on that years ago. That’s basically all there is to it.

Thanks for clarifying bro

permalink
report
parent
reply
3 points

If you try to mount 2 drives to the same location, like /media/drive, the last one that you mounted will just replace the first one. You could put one at /media/drive1 and the other at /media/drive2 though.

It doesn’t matter where you mount stuff, like it won’t break anything, as long as you’re not replacing an existing directory like I mentioned.

permalink
report
parent
reply
3 points

Thank You.

permalink
report
parent
reply
2 points

Mounting to a specific location should not affect the permissions of the drive. But in the case of NTFS and some other filesystems, Linux is not compatible with their permission model, so it is simplified by e.g. making all files be only accessible by root.
You can override this default with mount options, or change the permissions to sensible values with chmod and chown, but I’m not sure if changing them will have negative side effects on the windows side so the latter may not be a good idea.

permalink
report
parent
reply
1 point

Thank you bro. I think I’ll stick into making new folder for my disks in /.

permalink
report
parent
reply
16 points

Idk, I mount my disks in /mnt/whatever, though I don’t think it matters where you mount them.

permalink
report
reply
2 points

Thanks.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 9.5K

    Monthly active users

  • 5.9K

    Posts

  • 162K

    Comments