共计 998 个字符,预计需要花费 3 分钟才能阅读完成。
Linux 查看网卡 UUID
1、首先我们查看一下 nmcli
是哪个软件包提供的
1
|
# yum provides "*/nmcli"
|
2、安装 NetworkManager 服务
1
|
# yum -y install NetworkManager
|
3、启动 NetworkManager 服务
1
|
# service NetworkManager start
|
4、查看网卡 UUID
Tips: 如果有发现有报错
1
2 3 4 5 6 7 8 9 10 11 12
|
-- 查看 /var/log/messages 日志
# vi /var/log/messages
tips: 按两下大写的 G 跳到最后一页 报错: ... Apr 20 14:53:05 localhost NetworkManager[2013]: <info> NetworkManager (version 0.8.1-113.el6) is starting... Apr 20 14:53:05 localhost NetworkManager[2013]: <info> Read config file /etc/NetworkManager/NetworkManager.conf Apr 20 14:53:05 localhost NetworkManager[2013]: <error> [1492671185.606620] [nm-dbus-manager.c:278] nm_dbus_manager_init_bus(): Could not get the system bus. Make sure the message bus daemon is running! Message: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused ... -- 需要先启动 messagebus,再启动 NetworkManager # /etc/init.d/messagebus start
# service NetworkManager start
|
5、运行nmcli
报错:
发现有报错
g_slist_free_full
属于glist
的一个方法,缺少glist
解决方法:
1
|
# yum -y install glib2-devel
|
6、此时再运行 nmcli 即可查看网卡 UUID
1
2
|
# service NetworkManager start
# nmcli con
|