Finding the filesystem type of a partition in linux
To find the type of filesystem a partition or a media is of we can use the commands "df" or "mount".
Using df
Using df
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext4 53067292 47601336 2770228 95% /
tmpfs tmpfs 127140 0 127140 0% /lib/init/rw
udev tmpfs 121484 220 121264 1% /dev
tmpfs tmpfs 127140 4 127136 1% /dev/shm
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext4 53067292 47601336 2770228 95% /
tmpfs tmpfs 127140 0 127140 0% /lib/init/rw
udev tmpfs 121484 220 121264 1% /dev
tmpfs tmpfs 127140 4 127136 1% /dev/shm
The column with the heading "Type" gives the filesystem type. So the partition /dev/sda1 is of type ext4
To find the filesystem type of a specific partition pass the partition as the argument.
To find the filesystem type of a specific partition pass the partition as the argument.
$ df -T /dev/sda1
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext4 53067292 47601332 2770232 95% /
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext4 53067292 47601332 2770232 95% /
Using mount
$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
As listed the partition /dev/sda1 is of type ext4.
We can find the specific partition type by combining mount with grep.
We can find the specific partition type by combining mount with grep.
$ mount | grep /dev/sda1
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
0 comments:
Post a Comment