Ubuntu Server17.10 开始,弃用 /etc/network/interfaces 配置文件,改成 netplan ⽅式,配置⽂件是:/etc/netplan/01-netcfg.yaml nano /etc/netplan/01-netcfg.yaml # This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: ens33: dhcp4: no addresses: [192.168.21.180/24] gateway4: 192.168.21.2 nameservers: addresses: [114.114.114.114] addresses: [8.8.4.4] ctrl+o #保存配置 ctrl+x #退出 netplan apply #使配置文件生效
标签:ubuntu1804,network,配置文件,ctrl,静态,IP,netplan,etc,addresses From: https://www.cnblogs.com/colin88/p/17184008.html