blkid---对系统块设备信息查询
在Linux下可以使用blkid命令对查询设备上所采用文件系统类型进行查询。blkid主要用来对系统的块设备(包括交换分区)所使用的文件系统类型、LABEL、UUID等信息进行查询。要使用这个命令必须安装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> 显示指定信息,默认显示所有信息 -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、列出当前系统中所有已挂载文件系统的类型: sudo blkid 2、显示指定设备 UUID: sudo blkid -s UUID /dev/sda5 3、显示所有设备 UUID: sudo blkid -s UUID 4、显示指定设备 LABEL: sudo blkid -s LABEL /dev/sda5 5、显示所有设备 LABEL: sudo blkid -s LABEL 6、显示所有设备文件系统: sudo blkid -s TYPE 7、显示所有设备: sudo blkid -o device 8、以列表方式查看详细信息: sudo blkid -o list
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?