步1:
/etc/network/interfaces
步2:
# 主网卡配置(如 eth0 或 ens33) auto ens33 iface ens33 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 114.114.114.114
步3:
sudo systemctl restart networking