前言
最近在适配系统中涉及到了很多发行版,由于有个需求要知道根文件系统类型,记录一下常用的发行版所用的根文件系统类型,以及查看根文件系统的shell命令。
一、查看根文件系统
1.1 df -T
df - report file system disk space usage
-T, --print-type
print file system type
1.2 blkid
blkid - locate/print block device attributes
1.3 mount
mount - mount a filesystem
1.4 file -s
file — determine file type
-s, --special-files
This is useful for determining the filesystem types of the data in raw disk partitions, which are block special files.
1.5 parted
parted - a partition manipulation program
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
1.6 lsblk
lsblk - list block devices
-f, --fs
Output info about filesystems.
二、常见发行版的根文件系统类型
2.1 centos 6
centos 6(内核版本 2.6.32 )根文件系统类型是ext4  
2.2 centos 7
centos 7(内核版本 3.10.0)的根文件系统是xfs 
2.3 suse 11
suse11 (内核版本 3.0.101)根文件系统类型是ext3 
2.4 suse 12
suse12(内核版本 4.4.21)根文件系统是btrfs 
2.5 ubuntu 20.04
ubuntu 20.04(内核版本5.15.0)的根文件系统类型是ext4 
2.6 待补充
|