sudo su
cd /etc/netplan/
ip address 看网卡
gedit 01-network-manager-all.yaml
network:
version: 2
renderer: NetworkManager
ethernets:
enp2s0:
dhcp4: no
dhcp6: no
addresses: [10.12.189.XXX/24]
gateway4: 10.12.189.254
nameservers:
addresses: [202.114.0.242,114.114.114.114, 8.8.8.8]