How do I see the Linux file system type?

Source: Internet
Author: User
Tags uuid

The Linux commands used in the past must be good at summing up.

How do I see the Linux file system type?

1. The DF command reports the file system disk space utilization , using the-t option to display the file system type for a particular partition of the disk,-H human readable mode.

[[email protected] ~]# df-thfilesystem Type Size used Avail use% mounted on/dev/sda2 ext4 19G 12G 6.3G 65%/tmpfs tmpfs 491M 0 491M 0%/dev/shm/dev/sda1 ext4 190M 65M 116M 36%/boot

The 2.FSCK command can be used to detect and repair a file system , or to output a file system type for a specified disk partition. The- n parameter disables checking for file system errors, just shows what will be done.

[Email protected] ~]# fsck-n/dev/sda1 fsck from Util-linux-ng 2.17.2[/sbin/fsck.ext4 (1)--/boot] fsck.ext4/dev/sda1

The 3.lsblk command displays block device information, and when the-f option is used, the partition's file system type is printed

[[email protected] ~]# lsblk -fname   fstype  label            UUID                                   mountpointsr0    iso9660 centos 7  x86_64                                        sda                                                                    ├─sda1 ext4                      b5717723-fe1c-4add-81f2-e0015dd5753a /boot├─sda2 ext4                      9de67bcd-2282-4533-8f30-2657ed4e0f0c /└─sda3 swap                     6e49b772-f74f-4ba3-8a5c-e699cbc25053  [swap]

The 4.mount command is used to mount the file system without any parameters, and it prints information about the partition of the disk that contains the file system type.

[[email protected] ~]# mount/dev/sda2 on/type ext4 (rw) proc On/proc type proc (rw) Sysfs On/sys type SYSFS (rw) devpts o N/dev/pts type devpts (rw,gid=5,mode=620) Tmpfs on/dev/shm type TMPFS (rw)/dev/sda1 on/boot type EXT4 (rw) None on/proc/ Sys/fs/binfmt_misc type Binfmt_misc (rw

The 5.blkid command is used to locate or print block device properties.

[Email protected] ~]# blkid/dev/sda1:uuid= "b5717723-fe1c-4add-81f2-e0015dd5753a" type= "Ext4"/dev/sda2:uuid= " 9de67bcd-2282-4533-8f30-2657ed4e0f0c "type=" Ext4 "/dev/sda3:uuid=" 6e49b772-f74f-4ba3-8a5c-e699cbc25053 "TYPE=" Swap

The 6.file command recognizes file types , enables read block devices or character devices with the-s parameter, and-L enables symbolic link following.

[Email protected] ~]# File-ls/dev/sda1/dev/sda1:linux Rev 1.0 ext4 FileSystem data (needs Journal recovery) (extents) (Huge files)

7.fstab file is a file system information (such as Mount point, file system type, mount option, boot auto mount, etc.) file

[[email protected] ~]# cat /etc/fstab## /etc/fstab# created by  Anaconda on thu mar 16 00:24:26 2017## accessible filesystems, by  reference, are maintained under  '/dev/disk ' # see man pages fstab (5),  findfs (8),  mount (8)  and/or blkid (8)  for more info#uuid= 9de67bcd-2282-4533-8f30-2657ed4e0f0c /      ext4      defaults     1     1uuid= b5717723-fe1c-4add-81f2-e0015dd5753a /boot    ext4      Defaults     1     2uuid= 6e49b772-f74f-4ba3-8a5c-e699cbc25053 swap    swap    defaults      0     0tmpfs                   /dev/shm  tmpfs      defaults     0     0devpts                   /dev/pts   devpts     gid=5,mode=620  0     0sysfs                     /sys    sysfs     defaults     0      0proc                     /proc   proc      defaults     0     0# directories to Mount                  #挂载点    mount type       mount options      Backup    whether the boot disk self-test


Work Problems : Unable to boot due to modified/etc/fstab

Repair/etc/fstab using Linux rescue (Rescue mode) ( wrong configuration, then unable to restart the system )

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/92/85/wKiom1kARUSCj2AHAADWcEIEfVA310.png-wh_500x0-wm_ The 3-wmp_4-s_1241722180.png "title=" Fstab exception caused the boot to fail. png "alt=" wkiom1karuscj2ahaadwceiefva310.png-wh_50 "/>

Answer:

Can be solved by rescue mode.

Rescue mode does not support VIM

Vi/mnt/sysimage/etc/fstab, mount the error, repair or remove it.





This article is from the "funny Brother Notes" blog, be sure to keep this source http://qiuyt.blog.51cto.com/1229789/1919619

How do I see the Linux file system type?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.