How to determine the type of file system in Linux
Linux how to judge the file system type, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. Use the df command
The df command reports file system disk space utilization, to display the file system type of a specific disk partition, using the-T flag as follows:
$df-Th or $df-Th | grep "^ / dev"
Df command-find out the file system type
To better understand the df command, read the following article:
12 useful df commands to check disk space in Linux
Pydf-A command that replaces df and displays disk usage in color
2. Use the fsck command
Fsck is used to check and repair the Linux file system, and it can also output the file system type of the specified disk partition.
The-N flag disables checking for file system errors, it just shows what will be done (but we only need the file system type):
$fsck-N / dev/sda3 $fsck-N / dev/sdb1
Fsck-print Linux file system type
3. Use the lsblk command
Lsblk displays the block device, and when the-f option is used, it also prints the file system type of the partition:
$lsblk-f
Lsblk-displays the Linux file system type
4. Use the mount command
The mount command is used to mount a file system in Linux. It can also be used to mount an ISO image, mount a remote Linux file system, and so on.
When running without any parameters, it prints information about disk partitions, including the file system type:
$mount | grep "^ / dev"
Mount-displays the file system type in Linux
5. Use the blkid command
The blkid command is used to find or print block device attributes, as long as the disk partition is used as an argument:
$blkid / dev/sda3
Blkid-find out the file system type
6. Use the file command
The file command identifies the file type, enables read block or character devices with the-s flag, and enables symbolic link following with-L:
$sudo file-sL / dev/sda3
File-identifies the file system type
7. Use fstab files
/ etc/fstab is a static file system information (such as mount point, file system type, mount options, and so on) file:
$cat / etc/fstab
After reading the above, have you mastered the method of how to determine the type of file system in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!