Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-25-2012, 11:12 AM   #1
LQ Newbie
Registered: Aug 2012
Posts: 5

Rep: Reputation: Disabled
Talking /etc/mtab vs /proc/mounts


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 ?
Old 08-25-2012, 11:47 AM   #2
Registered: Dec 2010
Location: Boston, MA, USA
Distribution: Arch Linux
Posts: 460

Rep: Reputation: 38
My mtab is actually linked to /proc/self/mounts.

From here:

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
Old 08-25-2012, 01:47 PM   #3
LQ Newbie
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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 ?


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
/etc/mtab and /proc/mounts do not show tune2fs mount option nokangaroo Ubuntu 2 05-23-2011 05:16 PM
/etc/mtab not up-to-date compared to /proc/mounts kenneho Linux - Server 2 07-07-2009 03:28 AM
/etc/mtab vs. /proc/self/mounts ciotog Slackware 1 10-10-2005 05:31 AM
About /proc/mounts A-Liang Programming 3 11-27-2004 10:52 PM
/proc/mounts and /etc/mtab differs pradi_net Linux - Software 0 05-19-2004 10:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:52 AM.

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