linux實用技巧:使用腳本獲取活動網卡的mac地址

需求         因爲定製的ubuntu沒有dbus,導致qtnetwork的allinterface接口(獲取網卡)調用失敗,更改方式:使用腳本獲取mac地址到文件,qt從文件中讀取。 錯誤截圖          腳本獲取 ifconfig $if | head -n 1 | awk `{print $5}` ifconfig $if | head -n 1 | awk `{print $5
相關文章
相關標籤/搜索