이 콘텐츠는 선택한 언어로 제공되지 않습니다.
24.4.2. Using the blkid Command
The
blkid command allows you to display information about available block devices. To do so, type the following at a shell prompt as root:
blkid
blkid
For each listed block device, the
blkid command displays available attributes such as its universally unique identifier (UUID), file system type (TYPE), or volume label (LABEL). For example:
blkid
~]# blkid
/dev/vda1: UUID="7fa9c421-0054-4555-b0ca-b470a97a3d84" TYPE="ext4"
/dev/vda2: UUID="7IvYzk-TnnK-oPjf-ipdD-cofz-DXaJ-gPdgBW" TYPE="LVM2_member"
/dev/mapper/vg_kvm-lv_root: UUID="a07b967c-71a0-4925-ab02-aebcad2ae824" TYPE="ext4"
/dev/mapper/vg_kvm-lv_swap: UUID="d7ef54ca-9c41-4de4-ac1b-4193b0c1ddb6" TYPE="swap"
By default, the
blkid command lists all available block devices. To display information about a particular device only, specify the device name on the command line:
blkid device_name
blkid device_name
For instance, to display information about
/dev/vda1, type:
blkid /dev/vda1
~]# blkid /dev/vda1
/dev/vda1: UUID="7fa9c421-0054-4555-b0ca-b470a97a3d84" TYPE="ext4"
You can also use the above command with the
-p and -o udev command-line options to obtain more detailed information. Note that root privileges are required to run this command:
blkid -po udev device_name
blkid -po udev device_name
For example:
For a complete list of available command-line options, see the blkid(8) manual page.