linux下查看文件系统类型

时间:2023-03-08 22:35:49

1. df -hT命令  

-h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)

-T, --print-type      print file system type

[root@rhel7 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 18G .5G 13G % /
devtmpfs devtmpfs 911M 911M % /dev
tmpfs tmpfs 921M 921M % /dev/shm
tmpfs tmpfs 921M 8.4M 912M % /run
tmpfs tmpfs 921M 921M % /sys/fs/cgroup
/dev/sdb1 ext4 .8G 20M .6G % /testdisk
/dev/sda1 xfs 497M 124M 374M % /boot
tmpfs tmpfs 185M 185M % /run/user/

xfs是RHEL7版本默认的文件系统类型。

2. 使用parted磁盘管理工具查看

[root@rhel7 ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print list
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: .5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: Number Start End Size Type File system Flags
1049kB 525MB 524MB primary xfs boot
525MB .5GB .9GB primary lvm Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: Number Start End Size Type File system Flags
1049kB 5369MB 5368MB primary ext4 Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: Number Start End Size Type File system Flags
1049kB 106MB 105MB primary linux-swap(v1) Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/rhel-swap: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: Number Start End Size File system Flags
.00B 2147MB 2147MB linux-swap(v1) Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/rhel-root: .8GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: Number Start End Size File system Flags
.00B .8GB .8GB xfs (parted) quit
[root@rhel7 ~]#