Ubuntu 配置网卡

技术 · 2022-08-08

Ubuntu 18.04+

查看网卡配置文件

cd /etc/netplan/

编辑网卡配置文件

vi 00-installer-config.yaml

检查网卡配置文件是否有误

netplan try

应用网卡配置文件

netplan apply

Ubuntu 16.04-

编辑网卡文件

vi /etc/network/interfaces

静态 IP 参考

auto eth0
iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1

应用网卡配置

service networking restart
Linux 运维 服务器 网络
Theme Jasmine. 由 Cloudflare 提供 CDN 加速 ICP 20232321