linux 檢視網絡卡UUID

2022-04-18 09:02:10 字數 2279 閱讀 2546

virtualbox複製了虛擬機器,重新初始化網絡卡後,需要對/etc/sysconfig/network-scripts/ifcfg-eth0更新uuid值,雖然不改暫時也沒發現有問題。

網上查詢需要nmcli工具進行檢視。

1.首先我們檢視一下nmcli是哪個軟體包提供的

[root@localhost ~]# yum provides "*/nmcli"

loaded plugins: fastestmirror

loading mirror speeds from cached hostfile

* base: mirrors.163.com

* extras: mirrors.163.com

* updates: mirrors.163.com

repo : base

matched from:

filename : /usr/bin/nmcli

2.安裝networkmanager服務

[root@localhost ~]# yum -y install networkmanager

啟動networkmanager服務

[root@localhost ~]# /etc/init.d/networkmanager start

執行nmcli發現有報錯

[root@localhost ~]# nmcli con

error: could not connect to d-bus.

檢視/var/log/messages日誌

[root@localhost ~]# more /var/log/messages

...apr 20 14:53:05 localhost networkmanager[2013]: networkmanager (version 0.8.1-113.el6) is starting...

apr 20 14:53:05 localhost networkmanager[2013]: read config file /etc/networkmanager/networkmanager.conf

apr 20 14:53:05 localhost networkmanager[2013]: [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

...

3.需要先啟動messagebus,再啟動networkmanager

[root@localhost ~]# /etc/init.d/messagebus start

starting system message bus: [ ok ]

[root@localhost ~]# /etc/init.d/networkmanager start

setting network parameters... [ ok ]

starting networkmanager daemon: [ ok ]

4.此時再執行nmcli即可檢視網絡卡uuid

[root@localhost ~]# nmcli con

name uuid type scope timestamp-real

system eth0 bbc0e340-6979-4e10-8b98-f1d395e7304e 802-3-ethernet system thu 20 apr 2017 02:54:51 pm cst

name uuid type scope timestamp-real

LINUX檢視網絡卡UUID

有時我們不小心將 etc sysconfig network scripts ifcfg eth0 可以通過此檔案進行檢視uuid 刪除或者損壞,要重新編輯ifcfg eth0檔案時不知道網絡卡的uuid是什麼 當然也可以不寫 那我們還有什麼方法可以檢視網絡卡的uuid呢?在這裡我們使用的方法是使用...

Linux檢視網絡卡UUID另一方法

有時我們不小心將 etc sysconfig network scripts ifcfg eth0 可以通過此檔案進行檢視uuid 刪除或者損壞,要重新編輯ifcfg eth0檔案時不知道網絡卡的uuid是什麼 當然也可以不寫 那我們還有什麼方法可以檢視網絡卡的uuid呢?在這裡我們使用的方法是使用...

linux 檢視網絡卡流量

方法一 nloadwget 方法二 iftop 1 iftop介面相關說明介面上面顯示的是類似刻度尺的刻度範圍,為顯示流量圖形的長條作標尺用的。中間的 這兩個左右箭頭,表示的是流量的方向。2 iftop相關引數常用的引數 進入iftop畫面後的一些操作命令 注意大小寫 引數 a 監測能檢測到的所有網...