歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Ubuntu系統(三) IP查看配置

Ubuntu系統(三) IP查看配置

日期:2017/3/3 16:23:16   编辑:關於Linux

查看IP

輸入ifconfig如下圖:

配置網卡IP地址

vim etc/network/interfaces

auto eth0

iface eth0 inet static

address 192.168.1.10

netmask 255.255.255.0

gateway 192.168.1.1

:wq!

$sudo /etc/init.d/networking restart

默認配置

address+table鍵+值+回車

netmask+table鍵+值+回車

gateway+table鍵+值

網卡IP測 試

注意事項:

兩台服務器型號一樣,一個光驅能用一個光驅不能用,不能用光驅的服務器硬盤拿到能 用的光驅的服務器上安裝Ubuntu

安裝好後,再拿回來,發現啟動後ifconfig 提示錯誤

eth0:error while getting interface flags:

No such device

siocsifaddr;no such device

解決方法:

rm -rf /udev/rules.d/70-persistent-net.rules&reboot

重新 啟動後查看IP,OK

Copyright © Linux教程網 All Rights Reserved