Operating System - Linux
1829456 Members
2558 Online
109992 Solutions
New Discussion

How do I know which fs type is mounted?

 
SOLVED
Go to solution
K.C. Chan
Trusted Contributor

How do I know which fs type is mounted?

Besides the info on /etc/fstab, how do I know which fs type is the current filesystem? Is there a command like fstype you can run against it? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
4 REPLIES 4
Josh Owings
Frequent Advisor
Solution

Re: How do I know which fs type is mounted?

I don't know if this is what you are looking for, but have you tried doing a more on /etc/mtab?

example:
------------------------
/dev/hda5 / ext3 rw 0 0
none /proc proc rw 0 0
/dev/hda1 /boot ext2 rw 0 0
------------------------
Eric Ladner
Trusted Contributor

Re: How do I know which fs type is mounted?

Exactly.. /etc/mtab get's updated every time a file system is mounted or unmounted so it should always reflect the current state of all the active file systems.

As an example:

awk '{ print "Filesystem $2 is type $3" }' /etc/mtab
D. Jackson_1
Honored Contributor

Re: How do I know which fs type is mounted?

You can also check:

cat /proc/mounts
or
df -Tk


HTH

K.C. Chan
Trusted Contributor

Re: How do I know which fs type is mounted?

All,
How come df -Tk and cat /etc/mntab reports / as ext3 whereas cat /proc/mounts report / as ext2?

This is on RH 7.1 upgraded to kernel version 2.4.17 with ext3 as modules. I've ran tune2fs -j successfully on / file system. Anyone care to explain why cat /etc/mtab differ with /proc/mounts? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour