Skip to main content

Ubuntu2204 网络配置

统一网卡名称

vim /etc/default/grub

#修改

GRUB_CMDLINE_LINUX=" net.ifnames=0"
#重读配置文件并重启
grub-mkconfig -o /boot/grub/grub.cfg;reboot

配置ip

cd /etc/netplan/
vim 00-installer-config.yaml


network:
ethernets:
eth0:
addresses:
- 192.168.1.210/24
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses: [119.29.29.29]

version: 2
netplan apply