How does centos display uuid? How to generate uuid? What is uuid for?

1. How to display uuid

 

2. How to generate uuid

192.168.153.128[root@centos71908network-scripts 09:29]#grep -i uuid= /etc/sysconfig/network-scripts/ifcfg-ens33 
UUID="d6f45ee1-e4f9-40d3-8d7f-b8f2edb5161d"
#UUID="d6f45ee9-e4f9-40d3-8d7f-b8f2edb5161d"
 

192.168.153.128[root@centos71908network-scripts 09:26]#uuidgen ens33
ef964e5a-efb1-4d15-864d-639a1def7e6d

vim  /etc/sysconfig/network-scripts/ifcfg-ens33

192.168.153.128[root@centos71908network-scripts 09:34]#grep -i uuid= /etc/sysconfig/network-scripts/ifcfg-ens33 
UUID="ef964e5a-efb1-4d15-864d-639a1def7e6d"
#UUID="d6f45ee9-e4f9-40d3-8d7f-b8f2edb5161d"

192.168.153.128[root@centos71908network-scripts 09:34]#nmcli c show
NAME   UUID                                  TYPE      DEVICE 
ens33  d6f45ee1-e4f9-40d3-8d7f-b8f2edb5161d  ethernet  ens33  

192.168.153.128[root@centos71908network-scripts 09:35]#service network restart
Restarting network (via systemctl):                        [  OK  ]

192.168.153.128[root@centos71908network-scripts 09:35]#nmcli c show
NAME   UUID                                  TYPE      DEVICE 
ens33  ef964e5a-efb1-4d15-864d-639a1def7e6d  ethernet  ens33  
 

3. What is the use of uuid

The uuid in centos is required; uuid is the abbreviation of "Universally Unique Identifier", which is a standard for software construction and a globally unique identifier at the system level. Its function is to make all elements in the distributed system , can have unique identification information, and there is no need to specify the identification information through the central control terminal.

Guess you like

Origin blog.csdn.net/weixin_40191861/article/details/132180712