UUID-unique identifier of a device in linux-Linux Enterprise Application-Linux server application information. For more information, see the following section. In linux, everything is a file. All hardware devices are also considered as files by the system, and these hardware device files are stored in the/dev directory. However, such device files sometimes cannot uniquely identify a hardware, the most typical example is mobile devices, such as USB flash drives. When a USB flash drive is connected to the system, the device name/dev/sda1 may be assigned to it, however, if the USB flash drive is inserted into another system, the device name assigned to it may not be/dev/sda1, but may be/dev/sdb1. How can we keep it unchanged in any system? Of course there is a way, that is, the UUID unique identifier. Take a USB flash drive as an example. If a USB flash drive is divided into three zones, each zone is allocated with a UUID, which is recorded on the USB flash drive rather than in a system, in this way, the device names of the USB flash drive are different in different systems.
The following three commands can view the UUID:
1. ls-l/dev/disk/by-uuid/
This command can view all the device files with UUID in the system.
2. vol_id/dev/sdb1
View the volume ID of/dev/sdb1, that is, UUID
3. blkid/dev/sdb1
View the UUID of the block device/dev/sdb1. storage devices such as hard disks, USB disks, and optical disks are Block devices. You can use this command to view the UUID.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.