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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-25-2012, 10:12 AM
|
#1
|
LQ Newbie
Registered: Aug 2012
Posts: 5
Rep: 
|
/etc/mtab vs /proc/mounts
Hi,
I was reading about mounts and came across fstab, mtab and /proc/mounts, tried to read more about it. I wnated to ask that if
/etc/mtab is actually a link to /proc/mounts, then why do we need it at all ?
|
|
|
08-25-2012, 10:47 AM
|
#2
|
Member
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460
Rep:
|
My mtab is actually linked to /proc/self/mounts.
From here:
Quote:
When the proc filesystem is mounted (say at /proc), the files /etc/mtab and /proc/mounts have very similar contents. The former has somewhat more information, such as the mount options used, but is not necessarily up-to-date (cf. the -n option below). It is possible to replace /etc/mtab by a symbolic link to /proc/mounts, and especially when you have very large numbers of mounts things will be much faster with that symlink, but some information is lost that way, and in particular using the "user" option will fail.
|
Alex Brinister
|
|
|
08-25-2012, 12:47 PM
|
#3
|
LQ Newbie
Registered: Aug 2012
Posts: 5
Original Poster
Rep: 
|
You r correct !! My mistake. It is linked to /proc/self/mounts
/etc/mtab -> /proc/self/mounts
As far as I understand, proc always shows kernel's in-memory state. Why do we have the information at 2 places, rather 3 (if I include /proc/mounts, proc/self/mounts and /etc/mtab) ?
Also, when system shuts down, where does kernel store its in-memory stats for ex: /proc/self/mounts content ?
|
|
|
All times are GMT -5. The time now is 12:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|