ubuntu 静态IP设置:
1.输入:
sudo vim /etc/netplan/01-network-manager-all.yaml
Let NetworkManager manage all devices on this system
network:
ethernets:
ens33:
dhcp4: no
addresses: [192.168.1.119/24]
gateway4: 192.168.1.1
nameservers:
addresses: [114.114.114.114,8.8.8.8]
version: 2
2.执行:sudo netplan apply
格式参照下图