Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

askthedev.com Logo askthedev.com Logo
Sign InSign Up

askthedev.com

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Ubuntu
  • Python
  • JavaScript
  • Linux
  • Git
  • Windows
  • HTML
  • SQL
  • AWS
  • Docker
  • Kubernetes
Home/ Questions/Q 10634
Next
In Process

askthedev.com Latest Questions

Asked: September 26, 20242024-09-26T10:32:56+05:30 2024-09-26T10:32:56+05:30In: Ubuntu

In which location should I set up a permanent mount point for a drive on Ubuntu?

anonymous user

I’ve been wrestling with this whole drive-mounting situation on my Ubuntu machine, and I could really use some friendly advice. So, here’s the scoop: I’ve got this external drive that I use primarily for backups and some media files, and I want to set it up as a permanent mount point. But here’s where I get a bit lost—where exactly should I mount it?

I’ve read that the typical locations are under `/mnt` or `/media`, but I’m wondering which is really the best route to go. The `/mnt` directory seems more traditional for mounting drives, but would it make any sense to set it up in `/media` instead, especially since I might share this drive with a few other people who use this machine? Would it lead to confusion for them if they were looking at `/mnt` while the drive is in `/media`?

Another thing I’m considering is the naming convention. Should I name the mount point something like `/media/my_external_drive` or go for something a bit more descriptive? I could go with the backup type or the actual name of the drive—like `/media/my_photos_backup`—but I don’t want it to be overly complicated either.

Also, what’s the best way to ensure that the drive mounts automatically when I boot up? I’ve seen mentions of modifying the `/etc/fstab` file, but it sounds a bit daunting. Has anyone done this? Are there any pitfalls I should look out for while editing that file?

And while we’re at it, how do permissions come into play here? I want to make sure that anyone using the computer can access this drive without dealing with weird permission errors or anything. It’s so frustrating when you know there’s something simple that could hold everything up.

So, if anyone has thoughts, pointers, or experiences to share about where to mount my drive and how to handle all of this—please, I’m all ears!

  • 0
  • 0
  • 2 2 Answers
  • 0 Followers
  • 0
Share
  • Facebook

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Google
    or use

    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Google

    2 Answers

    • Voted
    • Oldest
    • Recent
    1. anonymous user
      2024-09-26T10:32:57+05:30Added an answer on September 26, 2024 at 10:32 am

      Mounting an external drive on your Ubuntu machine can be a bit tricky, but I’m here to help you navigate this!

      When it comes to choosing between /mnt and /media, it’s usually a matter of preference. However, here are some thoughts:

      • /mnt: This is traditionally used for temporary mounts, often by system administrators. It’s a good place if you’re the only one using the machine and you want to keep things neat.
      • /media: This is the go-to spot for removable media and is user-friendly. If others are sharing the machine, it might make more sense to use this location since it’s designed for such uses.

      As for naming the mount point, I’d suggest going for something descriptive yet simple. For instance, /media/my_photos_backup is clear and lets everyone know what the drive is for. Keeping it straightforward is key to avoiding confusion! Just avoid using overly complex names.

      To ensure your drive mounts automatically on boot, you’ll want to edit the /etc/fstab file. It may sound intimidating, but it’s manageable. Just make sure to:

      1. Back up the fstab file before editing it!
      2. Use the UUID of your drive instead of the device name (like /dev/sdb1) to prevent issues if the device order changes.
      3. Double-check the mount options; you usually want something like defaults or uid=1000,gid=1000 for user access.

      Speaking of permissions, here’s the scoop:

      To avoid permission problems:

      • Set the mount options in fstab to allow everyone to access it. For example: uid=1000,gid=1000,umask=000 gives read/write permissions to all users.
      • Consider using chmod on the mount point after it’s set up, if needed, to ensure it’s accessible by all.

      Overall, just take your time with each step, and don’t hesitate to reach out if you hit a snag. Happy mounting!

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. anonymous user
      2024-09-26T10:32:57+05:30Added an answer on September 26, 2024 at 10:32 am


      When it comes to deciding where to mount your external drive on your Ubuntu machine, both `/mnt` and `/media` are valid options, but they serve slightly different purposes. The `/mnt` directory is traditionally used for temporarily mounting filesystems that aren’t meant to be permanently attached, so if you’re looking for a more conventional approach, that might be the way to go. However, since you intend to share this drive with others, mounting it under `/media` could be more user-friendly. Ubuntu often uses the `/media` directory for user-accessible media, and it would likely be more intuitive for your users to find it there. A clear naming convention is essential, so consider naming your mount point something like `/media/my_photos_backup`—it’s descriptive enough to indicate its purpose without being overly complicated. This way, anyone can quickly understand what the drive is for.

      To ensure that your external drive mounts automatically at boot, you will indeed need to edit the `/etc/fstab` file. It’s essential to approach this file with caution; a syntax error can prevent your system from booting correctly. Before you make changes, back up the original file. You’ll typically need the UUID of your drive, which can be obtained using the command `blkid`. Once you have that, add a line to your `/etc/fstab` that resembles something like `UUID=your-drive-uuid /media/my_photos_backup ext4 defaults 0 0` (adjust the filesystem type as necessary). This will help with automatic mounting upon startup. Regarding permissions, to avoid access issues for other users, you can set the appropriate permissions on the mount point (e.g., using `chmod` or `chown`) to ensure it’s accessible to everyone who needs it. This way, you’ll avoid those frustrating permission errors while keeping your setup clean and efficient.


        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Related Questions

    • I'm having trouble installing the NVIDIA Quadro M2000M driver on Ubuntu 24.04.1 LTS with the current kernel. Can anyone provide guidance or solutions to this issue?
    • What steps can I take to troubleshoot high usage of GNOME Shell in Ubuntu 24.04?
    • I recently performed a fresh installation of Ubuntu 24.04, and I've noticed that my RAM usage steadily increases over time until my system becomes unresponsive. Has anyone experienced this issue ...
    • How can I resolve the "unknown filesystem" error that leads me to the GRUB rescue prompt on my Ubuntu system?
    • I'm experiencing an issue with Ubuntu 24.04 where Nautilus fails to display the progress indicator when I'm copying large files or folders. Has anyone else encountered this problem, and what ...

    Sidebar

    Related Questions

    • I'm having trouble installing the NVIDIA Quadro M2000M driver on Ubuntu 24.04.1 LTS with the current kernel. Can anyone provide guidance or solutions to this ...

    • What steps can I take to troubleshoot high usage of GNOME Shell in Ubuntu 24.04?

    • I recently performed a fresh installation of Ubuntu 24.04, and I've noticed that my RAM usage steadily increases over time until my system becomes unresponsive. ...

    • How can I resolve the "unknown filesystem" error that leads me to the GRUB rescue prompt on my Ubuntu system?

    • I'm experiencing an issue with Ubuntu 24.04 where Nautilus fails to display the progress indicator when I'm copying large files or folders. Has anyone else ...

    • How can I configure a server running Ubuntu to bind specific IP addresses to two different network interfaces? I'm looking for guidance on how to ...

    • Is it possible to configure automatic login on Ubuntu MATE 24.04?

    • After upgrading from Ubuntu Studio 22.04 to 24.04.1, I lost all audio functionality. What steps can I take to diagnose and resolve this issue?

    • I am experiencing issues booting Ubuntu 22.04 LTS from a live USB. Despite following the usual procedures, the system fails to start. What steps can ...

    • I'm encountering a problem with my Expandrive key while trying to update my Ubuntu system. Has anyone else faced similar issues, and if so, what ...

    Recent Answers

    1. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    2. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    3. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    4. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    5. anonymous user on How can I update the server about my hotbar changes in a FabricMC mod?
    • Home
    • Learn Something
    • Ask a Question
    • Answer Unanswered Questions
    • Privacy Policy
    • Terms & Conditions

    © askthedev ❤️ All Rights Reserved

    Explore

    • Ubuntu
    • Python
    • JavaScript
    • Linux
    • Git
    • Windows
    • HTML
    • SQL
    • AWS
    • Docker
    • Kubernetes

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.