LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2020, 10:20 PM   #1
varaonaid
Member
 
Registered: Mar 2007
Posts: 39

Rep: Reputation: 2
Question Standard/best location to permanently mount partition/drive


Hi,

I’ve read a number of articles and thread on this subject but none really seems to agree. I’ve read that Linux tends to use /media or /mnt as the location to temporarily mount external drives or partitions but that if editing fstab, it’s best to avoid these so that there isn’t any potential overlap to cause issues.

Is there a standard or best practices location that one should put drives that will be permanently automounted to the system? Or does it really not matter? I’m just trying to get things up properly from the start.

Thanks so much in advance! Looking forward to hearing your thoughts.
 
Old 07-07-2020, 11:56 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,953

Rep: Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475
The File System Hierarchy standard, I guess.

There is a shorter version on Wikipedia, too.
 
2 members found this post helpful.
Old 07-07-2020, 11:57 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,965

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
I create my permanent mounts in /mnt - simply because I always have. Never had a problem.
Each distro seems to want to do it slightly differently re things like /run and /media so I just leave them alone.
 
1 members found this post helpful.
Old 07-08-2020, 12:19 AM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,410

Rep: Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631
/mnt is for temporary mounts.
For ex if an NFS automount does not work, the Linux automounter does not say the reason, so I manually try to mount it to /mnt then I get the error like "does not exist", "permission denied", "time-out talking to server".
 
Old 07-08-2020, 12:39 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,965

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
:shrug: - works for me.

You didn't answer the OPs question.
 
1 members found this post helpful.
Old 07-09-2020, 05:26 AM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Linux Mint
Posts: 1,737

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
My permanent mounts go in /mnt because that's where I started putting them when I began using Linux and haven't seen any need to change.
 
Old 07-09-2020, 10:17 AM   #7
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,669

Rep: Reputation: Disabled
If it is to be permanently attached, I'll create a directory for it & add it to my fstab, but usually, I'll manually mount any extra disks/pendrives to /mnt, & unmount them when I'm done.
 
Old 07-09-2020, 11:34 AM   #8
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Xubuntu
Posts: 5,572

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
If you leave the computer to its own devices, you can end up with it using a label that gives you a mount point like
/media/Verbatim Store n Go
which is hardly a good idea. I do usb backups, using alternating devices, so I want them mounted consistently, and so I create /media/usb and put a line in /etc/fstab to make sure it's used.

Originally /mnt was used. Then they decided that should be used for temporary mounts, and long-term usage should be a sub-directory of /media. Then /run was introduced for very technical reasons and some distros have started mounting within that, using /run/media/$USER/[whatever].

In practice you can do whatever you like!
 
Old 07-09-2020, 03:13 PM   #9
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,743

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
/etc/fstab mounts go in /mnt
Things I mount via CLI go in /mnt
I've seem to have some automounts in /media

Probably non-standard, but it doesn't matter.

Use the findmnt command to find where a filesystem is mounted.
 
Old 07-09-2020, 03:39 PM   #10
SteveMann
LQ Newbie
 
Registered: Apr 2020
Posts: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by varaonaid View Post
Hi,

Iíve read a number of articles and thread on this subject but none really seems to agree. Iíve read that Linux tends to use /media or /mnt as the location to temporarily mount external drives or partitions but that if editing fstab, itís best to avoid these so that there isnít any potential overlap to cause issues.

Is there a standard or best practices location that one should put drives that will be permanently automounted to the system? Or does it really not matter? Iím just trying to get things up properly from the start.

Thanks so much in advance! Looking forward to hearing your thoughts.
None really agree because you can mount to any folder where you have read/write permissions.
But, in general, you want to use /mnt just for clarity. Leave /media for the O/S to manage. Ubuntu, for example, will automount your USB thumbdrive here.
 
Old 07-09-2020, 03:48 PM   #11
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,489

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
I do the same as fatmac, create a directory for permanent mounts and /mnt for temporary mounts. I guess it is more or less what one prefers or use to doing
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Google I/O Android News: Location, Location, Location (Plus Cloud Messaging and Bluetooth) LXer Syndicated Linux News 0 06-05-2013 01:00 PM
what does "standard error was duplicated as standard output" mean? nickleus Linux - General 4 09-15-2006 06:14 AM
location, location, location! mermxx LQ Suggestions & Feedback 9 09-25-2004 03:08 AM
permanently mount windows partition? Tech19 Linux - Newbie 3 07-28-2003 01:02 AM
standard vs Expert install? Standard flubs up! Frost Linux - Software 1 03-27-2002 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration