linux中无意把ifcfg-eth中的UUID删掉了,怎么找到这个UUID?

1、我们安装NetworkManager这个软件包

[root@huis ~]# yum -y install NetworkManager

2、启动NetworkManager服务

[root@huis ~]# service NetworkManager start
Setting network parameters… [ OK ]
Starting NetworkManager daemon: [ OK ]

3、查看网卡UUID

[root@huis ~]# nmcli con | sed -n ‘1,2p’
NAME UUID TYPE SCOPE TIMESTAMP-REAL
System eth0 c1021d28-7238-4f26-8e92-4aea5d607cab 802-3-ethernet system Mon 08 Dec 2014 12:49:14 PM CST

4、检验是否与/etc/sysconfig/network-scripts/ifcfg-eth0里面的UUID值相同(注:检验只在ifcfg-eth0文件能正常查看UUID时才有效)

[root@huis ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep UUID
UUID=c1021d28-7238-4f26-8e92-4aea5d607cab

你可能感兴趣的:(linux)