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.

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    5 months 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
      link
      fedilink
      arrow-up
      5
      ·
      5 months 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
        link
        fedilink
        arrow-up
        3
        ·
        5 months 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.

  • cmnybo@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    2
    ·
    5 months 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.todayOP
      link
      fedilink
      arrow-up
      5
      ·
      5 months ago

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

      Thank You

  • GnuLinuxDude@lemmy.ml
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    5 months 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.

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 months ago

      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’

      • GnuLinuxDude@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        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

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          2
          ·
          5 months ago

          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

      • ReversalHatchery@beehaw.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        5 months ago

        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.

  • Presi300@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    5 months ago

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

  • MrSoup@lemmy.zip
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    5 months ago

    The Linux FHS does not address this, so it’s up to you where to mount it. There is no correct choice, but if you want to follow standards just mount it inside /mnt which is the nearest use-case (/media could be automatically used by your DE, so avoid it). Otherwise you can just create a custom folder in root like someone else suggested.

    Take a look at FHS spec.

    Edit:
    On arch forum someone suggests /mnt/data

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 months ago

      Thank You.

      Otherwise you can just create a custom folder in root like someone else suggested

      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’

      • MrSoup@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        5 months ago

        /mnt/something has root as Owner. So When I try to move something to Trash, it’s not allowing me to do

        You have to change permissions or owner of that folder (not /mnt itself but the subfolder “something”).
        If I’m not wrong changing permissions is enough to use gui “move to trash”, you can use chmod thru cli (man chmod) o your gui file manager with root privileges.

        If you want only your user be able to read/write to that disk, then change the owner using chown thru cli (man chown) or again your gui file manager.

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          1
          ·
          5 months ago

          So, if I use chmod, I get the access and other users (if any) are free to do so.

          In case of chown, I get the full access and others can’t gain access unless I permit.

          Right?

  • Rudee@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    5 months ago

    Not a pro by any means, but I mount my internal drives at /mnt. Its also where I mount my NAS

    AFAIK mount point doesn’t matter

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    5 months 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.

  • Björn Tantau@swg-empire.de
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    5 months ago

    There’s also /run/media/[username]/. Don’t know if it’s an OpenSUSE thing or Plasma but everything I mount through KDE’s file manager Dolphin ends up there. Including stuff I set up to mount automatically.

  • exuA
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 months ago

    I use multiple subdirectories under /mnt for my fstab/systemd-mount managed disks. That includes local and network locations.

      • exuA
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        5 months ago

        Yeah, but you need root anyways to mount disks (most of the time), so doing a quick chown isn’t that much effort.

        Edit: chown > chmod

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      Even if I switch my drives or folder names

      You don’t mean changing name of ‘Videos’ right?

      entire drive is mounted to /media first, and then all subdirectories are mounted where I need them.

      So you mount directories accordind to your need not drives and partitions? Seems flexible.

      then your cannot boot into your system anymore.

      Why? Are you talking about removing the drive that contains /?

      • thingsiplay@beehaw.org
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        Oh, I deleted my reply a while ago. But you seem to be able to see it still.

        The Videos name change is meant, if I mount the folder on my drive to /home/name/Videos, then next time I mount anything to that place when replacing the drive, then /home/name/Videos will stay the same. That means any application using that path won’t change. That’s the majority how I use my multiple internal drives. I just mount them to fixed positions I use for decades, like in my home.

        I prefer directories over partitions, because I can easily rename directories and place them to other places without ever partitioning or resizing again.

        Why? Are you talking about removing the drive that contains /?

        About the not being able to boot, no I don’t mean the drive that contains the root /. When I mount drives with the /etc/fstab file, then the system tries to mount them on boot time. If the directory that is mounted or the drive is no longer available or I unplug it (lets say when I replace my Documents drive), then at boot time the system tries to mount something that does no longer exist in their view, according to the fstab file.

        By default (at least on my current system EndevaourOS, based on Arch) the system stops booting. It gives me the option to ignore that mount entry, so I can boot again. But if I had not this option to ignore, then one has to edit the /etc/fstab file to outcomment those sections; in example with a boot cd or usb drive. Normally not a problem, but just telling it here, so in case you know what to do (if you ever go that route).

        • NaN@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          5 months ago

          Adding the nofail option to the fstab entry will continue boot if the drive isn’t present.

          • thingsiplay@beehaw.org
            link
            fedilink
            arrow-up
            3
            ·
            5 months ago

            That’s great! I didn’t know this (obviously). I will read into this option more, before making changes. It’s not something I need much often (really only happened a few times in a decade). But its good to know!

        • gpstarman@lemmy.todayOP
          link
          fedilink
          arrow-up
          3
          ·
          5 months ago

          Thank You.

          for some reason Photon UI still shows the deleted comment with just trash can symbol.

  • Kelo@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    5 months ago

    I myself have separate /Disks folder where I mount all my internal disks on boot. Not sure how “standard” such setup is, but it helped me keep my NTFS and Linux disks tidy and out of my way. For what I know you can mount your drives anywhere you like

    • gpstarman@lemmy.todayOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 months ago

      Seems Clean.

      No Disadvantages? Like some stubborn program says I will only work if its under /mnt?