换源
sed -i 's/ports.ubuntu.com/mirrors.bfsu.edu.cn/g' /etc/apt/sources.list
改ip
vim /etc/netplan/01-network-manager-all.yaml
内容如下:
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: no
addresses: [192.168.2.6/24]
gateway4: 192.168.2.1
eth1:
dhcp4: true
dhcp4-overrides:
route-metric: 200
改dns
vim /etc/resolv.conf
nameserver 8.8.8.8