1. First, let's check which package provides nmcli.
1
2
3
4
5
6
7
8
9
10
11
|
[
root
@
huis
~
]
# yum provides "*/nmcli"
Loaded
plugins:
fastestmirror
,
security
Loading
mirror
speeds
from
cached
hostfile
*
base
:
mirrors
.
cug
.
edu
.
cn
*
extras
:
mirrors
.
cug
.
edu
.
cn
*
updates
:
centos
.
ustc
.
edu
.
cn
1
:
NetworkManager
-
0.8.1
-
75.el6.i686
:
Network
connection
manager
and
:
user
applications
Repo
:
base
Matched
from
:
Filename
:
/
usr
/
bin
/
nmcli
|
2. It can be seen from the above results that nmcli, then we install the NetworkManager package
1
|
[
root
@
huis
~
]
# yum -y install NetworkManager
|
3. Start the NetworkManager service
1
2
3
|
[
root
@
huis
~
]
# service NetworkManager start
Setting
network
parameters
.
.
.
[
OK
]
Starting
NetworkManager
daemon
:
[
OK
]
|
4. View the UUID of the network card
1
2
3
|
[
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
|
5. Check whether it is the same as the UUID value in /etc/sysconfig/network-scripts/ifcfg-eth0 (Note: The check is only valid when the ifcfg-eth0 file can view the UUID normally)
1
2
|
[
root
@
huis
~
]
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep UUID
UUID
=
c1021d28
-
7238
-
4f26
-
8e92
-
4aea5d607cab
|