Ubuntu 18:
cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
# renderer: NetworkManager
ethernets:
wlp3s0:
addresses: [192.168.0.113/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8]
运行: netplan apply
Ubuntu 16:
静态:
auto wlp3s0
iface wlp3s0 inet static
address 192.168.0.199
netmask 255.255.255.0
gateway 192.168.0.1
DHCP:
auto enp0s3
iface enp0s3 inet dhcp