Ubuntu18網路配置

2021-10-06 00:28:05 字數 816 閱讀 5706

ubuntu18推薦使用netplay配置網路

顯示系統全部資訊:uname -a

顯示lsb和特定版本的相關資訊:lsb_release -a

如果沒有就建立乙個:

vim /etc/netplan/50-cloud-init.yaml

network:

version:

2 ethernets:

enp0s3:

-- 網絡卡名稱

addresses:

[172.18

.1.233/24

,]-- ip/掩碼

dhcp4: no -- 動態分配ipv4

dhcp6: no -- 動態分配ipv6

gateway4:

172.18

.0.1

-- 閘道器

nameservers:

addresses:

[8.8

.8.8

,114.114

.114

.114

]-- dns伺服器

(後者命令執行出錯會回滾)

檢視網路配置:ifconfig

配置host:sudo vim /etc/hosts

18 網路配置

etc sysconfig network scripts 編輯相對應的網絡卡配置檔案 type ethernet proxy method none browser only no bootproto static dhcp動態獲取,或者靜態配置ip defroute yes ipv4 failu...

Ubuntu8 10網路配置

1 使用新增 刪除工具刪除網路管理程式 8.10的乙個bug所在 2 sudo gedit etc network inte ces 改為auto eth0 iface eth0 inet static address 192.168.0.220 netmask 255.255.255.0 gate...

Ubuntu 16 04網路配置

安裝完ubuntu 16.04後,配置靜態網路 vim etc network inte cesauto eth0 iface eth0 inet static address x.x.x.x netmask x.x.x.x gateway x.x.x.x配置完成,重啟網路服務 etc init.d...