Linux常用命令——blkid命令

在线Linux命令查询工具

blkid

查看块设备的文件系统类型、LABEL、UUID等信息

补充说明

在Linux下可以使用blkid命令对查询设备上所采用文件系统类型进行查询。blkid主要用来对系统的块设备(包括交换分区)所使用的文件系统类型、LABEL、UUID等信息进行查询。要使用这个命令必须安装e2fsprogs软件包。

语法

shell 复制代码
blkid -L | -U
blkid [-c ] [-ghlLv] [-o] [-s ][-t ] -[w ] [ ...]
blkid -p [-s ] [-O ] [-S ][-o] ...
blkid -i [-s ] [-o] ...

选项

shell 复制代码
-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>    # 显示指定信息,默认显示所有信息
-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、列出当前系统中所有已挂载文件系统的类型:

shell 复制代码
sudo blkid

2、显示指定设备 UUID:

shell 复制代码
sudo blkid -s UUID /dev/sda5

3、显示所有设备 UUID:

shell 复制代码
sudo blkid -s UUID

4、显示指定设备 LABEL:

shell 复制代码
sudo blkid -s LABEL /dev/sda5

5、显示所有设备 LABEL:

shell 复制代码
sudo blkid -s LABEL

6、显示所有设备文件系统:

shell 复制代码
sudo blkid -s TYPE

7、显示所有设备:

shell 复制代码
sudo blkid -o device

8、以列表方式查看详细信息:

shell 复制代码
sudo blkid -o list

在线Linux命令查询工具

相关推荐
2201_7611990443 分钟前
nginx 负载均衡1
linux·运维·服务器·nginx·负载均衡
suri ..1 小时前
【Linux】进程第三弹(虚拟地址空间)
linux·运维·服务器
害羞的白菜1 小时前
Nginx基础详解5(nginx集群、四七层的负载均衡、Jmeter工具的使用、实验验证集群的性能与单节点的性能)
linux·运维·笔记·jmeter·nginx·centos·负载均衡
纪伊路上盛名在1 小时前
如何初步部署自己的服务器,达到生信分析的及格线
linux·运维·服务器·python·学习·r语言·github
爱滑雪的码农1 小时前
快速熟悉Nginx
运维·nginx·dubbo
Betty’s Sweet1 小时前
[Linux]:线程(三)
linux·线程·信号量·生产者消费者模型
0DayHP1 小时前
HTB:Bike[WriteUP]
运维·服务器
程序员南飞3 小时前
ps aux | grep smart_webrtc这条指令代表什么意思
java·linux·ubuntu·webrtc
StrokeAce3 小时前
linux桌面软件(wps)内嵌到主窗口后的关闭问题
linux·c++·qt·wps·窗口内嵌
热爱嵌入式的小许7 小时前
Linux基础项目开发1:量产工具——显示系统
linux·运维·服务器·韦东山量产工具