今天装完 ubuntu 18 LTS,配置网络时发现Ubuntu 18LTS ifupdown has been replaced by netplan(5) on this system。

创新互联公司专注于新兴网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供新兴营销型网站建设,新兴网站制作、新兴网页设计、新兴网站官网定制、小程序定制开发服务,打造新兴网络公司原创品牌,更为您提供新兴网站排名全网营销落地服务。
随手记录一下netplan配置。
- vim /etc/network/interfaces 修改网络配置时发现Ubuntu 18LTS ifupdown has been replaced by netplan(5) on this system。
# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown
- 直接配置netplan吧
vim /etc/netplan/50-cloud-init.yaml
配置如下:
network:
ethernets:
enp4s0:
addresses: [192.168.0.20/24] //IP址
gateway4: 192.168.0.1 // 网关
nameservers:
addresses: [114.114.114.114, 192.168.0.1] //DNS
dhcp4: no
optional: no
version: 2
- 启用生效
sudo netplan apply
新闻名称:Ubuntu18LTSnetplan网络配置
网站路径:http://jxjierui.cn/article/coihshs.html


咨询
建站咨询
