查看塊設(shè)備的文件系統(tǒng)類型、LABEL、UUID等信息
在Linux下可以使用 blkid命令 對查詢設(shè)備上所采用文件系統(tǒng)類型進(jìn)行查詢。blkid主要用來對系統(tǒng)的塊設(shè)備(包括交換分區(qū))所使用的文件系統(tǒng)類型、LABEL、UUID等信息進(jìn)行查詢。要使用這個(gè)命令必須安裝e2fsprogs軟件包。
blkid -L | -U
blkid [-c ] [-ghlLv] [-o] [-s ][-t ] -[w ] [ ...]
blkid -p [-s ] [-O ] [-S ][-o] ...
blkid -i [-s ] [-o] ...
-c <file> # 指定cache文件(default: /etc/blkid.tab, /dev/null = none)
-d # don't encode non-printing characters
-h # 顯示幫助信息
-g # garbage collect the blkid cache
-o <format> # 指定輸出格式
-k # list all known filesystems/RAIDs and exit
-s <tag> # 顯示指定信息,默認(rèn)顯示所有信息
-t <token> # find device with a specific token (NAME=value pair)
-l # look up only first device with token specified by -t
-L <label> # convert LABEL to device name
-U <uuid> # convert UUID to device name
-v # 顯示版本信息
-w <file> # write cache to different file (/dev/null = no write)
<dev> # specify device(s) to probe (default: all devices)
Low-level probing options:
-p # low-level superblocks probing (bypass cache)
-i # gather information about I/O limits
-S <size> # overwrite device size
-O <offset> # probe at the given offset
-u <list> # filter by "usage" (e.g. -u filesystem,raid)
-n <list> # filter by filesystem type (e.g. -n vfat,ext3)
1、列出當(dāng)前系統(tǒng)中所有已掛載文件系統(tǒng)的類型:
sudo blkid
2、顯示指定設(shè)備 UUID:
sudo blkid -s UUID /dev/sda5
3、顯示所有設(shè)備 UUID:
sudo blkid -s UUID
4、顯示指定設(shè)備 LABEL:
sudo blkid -s LABEL /dev/sda5
5、顯示所有設(shè)備 LABEL:
sudo blkid -s LABEL
6、顯示所有設(shè)備文件系統(tǒng):
sudo blkid -s TYPE
7、顯示所有設(shè)備:
sudo blkid -o device
8、以列表方式查看詳細(xì)信息:
sudo blkid -o list