120
submitted 2 days ago* (last edited 2 days ago) by gpstarman@lemmy.today to c/linux@lemmy.ml

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.

top 50 comments
sorted by: hot top controversial new old
[-] Nibodhika@lemmy.world 5 points 1 day ago

Permanent drives should be put wherever you want them to, for example I have mine mounted in /ld1 for Large Disk 1. /media is supposed to be used by systems to mount things you plug, but some systems move that to /var/run/media or other places. /mnt is there so you don't have to create a folder in case you want to mount something really quick.

[-] gpstarman@lemmy.today 3 points 1 day ago

Thanks man.

[-] odc 22 points 1 day ago

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

[-] Presi300@lemmy.world 16 points 2 days ago

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

[-] gpstarman@lemmy.today 2 points 1 day ago
[-] cmnybo@discuss.tchncs.de 33 points 2 days ago

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.

[-] gpstarman@lemmy.today 10 points 2 days ago

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

Thank You

[-] atzanteol@sh.itjust.works 40 points 2 days ago* (last edited 2 days ago)

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.

[-] Nyanix@lemmy.ca 4 points 1 day ago

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.

[-] nik282000@lemmy.ca 2 points 1 day ago

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.

load more comments (1 replies)
[-] Revan343@lemmy.ca 16 points 2 days ago* (last edited 2 days ago)

Mounting locations are a convention, not a standard, mount whatever you like wherever you like. In your case, I'd mount it under /mnt/ntfs, /mnt/windows if it a windows main partition you want visible, or by drive letter if it's a secondary drive on a dual-boot system.

Or however you want. I would keep it under /mnt, but you don't have to.

Do maybe sure you have user permissions set up properly if this is a multiuser machine though

Edit: also I would interpret

If /mnt is for temporary

'temporary' as in 'may become unmounted without seriously fucking the system'

/ and /home aren't temporary. Everywhere else is

[-] gpstarman@lemmy.today 3 points 2 days ago

'temporary' as in 'may become unmounted without seriously fucking the system'

Thanks bro. Now it make sense.

[-] SimplyTadpole@lemmy.dbzer0.com 14 points 2 days ago

Use any you want. I've been mounting my internal secondary hard drive on /mnt for well over a year now and haven't had any problems. Previously, I mounted it on ~/Storage and it also worked fine (though only because I'm the only user in my computer; dual-user systems would result in the other user being unable to access the hard drive).

load more comments (1 replies)
[-] Pika@sh.itjust.works 6 points 2 days ago* (last edited 2 days ago)

Actually since their permanent non-removable drives, I would say wherever you want to place them, if they're meant primarily for storing user-based data you can do like what I used to do which was store them in within the home directory just as specific names. Like my old setup before I went proxmox was /backups was my backup drive, /home was my home drive that stored most of my users /home/steam held all my game server drive and /home/storage held my long term cold storage drive.

load more comments (1 replies)
[-] deadbeef79000@lemmy.nz 4 points 2 days ago

In the past I've tended towards /srv/* as most mounts end up being application specific storage.

Though now it is all mounted as container volume storage.

[-] xenspidey@lemmy.zip 2 points 1 day ago

I use /srv for all mu shared mounts for all the *arr's

load more comments (5 replies)
[-] rotopenguin@infosec.pub 15 points 2 days ago
load more comments (7 replies)
[-] GnuLinuxDude@lemmy.ml 16 points 2 days ago

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.

load more comments (13 replies)
[-] wargreymon@sh.itjust.works 13 points 2 days ago* (last edited 2 days ago)

The best mounting position is /booty.

[-] gpstarman@lemmy.today 8 points 2 days ago

Thank You for suggestion. Gonna try that Tonight and have fun mounting loads of data.

[-] lazylion_ca@lemmy.ca 8 points 2 days ago

I create /data and mount my 2nd drive there using fstab.

I then mount /data/downloads under my user downloads folder so everything goes to my 2nd drive. That way I dont have to redownload anything if I redo my main drive.

load more comments (8 replies)
[-] CMDR_Horn@lemmy.world 8 points 2 days ago

Basically if I add it to my fstab it goes to /mnt. I let the system handle /media for usb etc

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 04 Jul 2024
120 points (97.6% liked)

Linux

45567 readers
827 users here now

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

Related Communities

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

founded 5 years ago
MODERATORS