LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   diference between /etc/fstab and /etc/mtab (https://www.linuxquestions.org/questions/linux-newbie-8/diference-between-etc-fstab-and-etc-mtab-503273/)

cnm 11-20-2006 09:03 AM

diference between /etc/fstab and /etc/mtab
 
what is the diference between /etc/fstab and /etc/mtab
which one do we have to change manualy.

pixellany 11-20-2006 09:10 AM

One has an "f"--the other has an "m"
Oh---sorry---that's not what you meant....;)

fstab tells you where and how things WILL be mounted (at startup or manually, depending on settings)

mtab tells you where things ARE mounted

fstab is the one to edit

man fstab, man mtab, and man mount for all the gory details

kutty_prasad 11-20-2006 10:43 PM

I would like to add one more. When you type mount at the command prompt, it shows all the mounted partitions. This info. is taken from /etc/mtab. Basically mtab is dynamic and it's contents changes whenever a partition is mounted/unmounted.

cnm 11-21-2006 01:30 AM

Quote:

Originally Posted by pixellany
One has an "f"--the other has an "m"
Oh---sorry---that's not what you meant....;)

fstab tells you where and how things WILL be mounted (at startup or manually, depending on settings)

mtab tells you where things ARE mounted

fstab is the one to edit

man fstab, man mtab, and man mount for all the gory details


ok does that mean, when ever we create a new partition we have to add a line to /etc/fstab and then after you run "mount -a" it will be displayed in /etc/mtab too.

lurko 11-21-2006 05:54 AM

yes. except it might be better to run "mount /path/to/mountpoint" if everything else in fstab is already mounted. "mount -a" will certainly do the trick however.


All times are GMT -5. The time now is 04:23 PM.