In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the blkid command to query the device in Linux. The content of the article is of high quality. Therefore, Xiaobian shares it with you as a reference. I hope that after reading this article, you will have a certain understanding of relevant knowledge.
Under Linux, you can query the file system type used on the query device using the blkid command. blkid is mainly used to query the file system type, LABEL, UUID and other information used by block devices (including swap partitions) of the system. To use this command you must install the e2fsprogs package.
Use blkid directly to list all types of mounted file systems on the current system.
By default, lsblk outputs block devices in tree format:
NAME --Name of the device
MAJ:MIN -Each device in the Linux operating system is represented by a file, and for block (disk) devices, the device is described here by a primary and secondary device number.
RM -Mobile equipment. If this is a mobile device it will display 1, otherwise it will display 0.
TYPE --Type of equipment
MOUNTPOINT --The location where the device is mounted
RO --For read-only file systems, 1 is displayed here, otherwise 0 is displayed.
SIZE --Capacity of the device
Examples of using blkid:
The code is as follows:
[root@localhost ~]# blkid -s UUID /dev/sda5 #Display specified device UUID
/dev/sda5: UUID="cad7349a-601d-4df4-a46b-90e1ffc29b1b"
The code is as follows:
[root@localhost ~]# blkid -s UUID #Show all device UUIDs
/dev/sda5: UUID="cad7349a-601d-4df4-a46b-90e1ffc29b1b"
/dev/sda1: UUID="d7899bc2-b08e-48cd-b904-54956c085951"
The code is as follows:
[root@localhost ~]# blkid -s LABEL /dev/sda5 #Show specified device LABEL
/dev/sda5: LABEL="Disk E"
The code is as follows:
[root@localhost ~]# blkid -s LABEL #Show all devices LABEL
/dev/sda1: LABEL="M-fM-^VM-0M-eM-^JM- M-eM-^MM-7"
/dev/sda5: LABEL="Disk E"
The code is as follows:
[root@localhost ~]# blkid -s TYPE #Show all device file systems
/dev/sda5: TYPE="swap"
/dev/sda1: TYPE="ext4"
The code is as follows:
[root@localhost ~]# blkid -o device #Show all devices
/dev/sda5
/dev/sda1
The code is as follows:
root@tnak-VirtualBox:/home/tnak# blkid -o list #View details in list
device fs_type label mount point UUID
-----------------------------------------------------------------------------------------------------------------------
/dev/sda5 swap cad7349a-601d-4df4-a46b-90e1ffc29b1b
/dev/sda1 ext4 / d7899bc2-b08e-48cd-b904-54956c085951
How to use the blkid command to query the device in Linux is shared here. I hope the above content can be of some help to everyone and learn more. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.