Ubuntu Server 18.04 网络设置不生效的解决

在Ubuntu18.04中,传统的配置/etc/network/interfaces已无用https://www.cnblogs.com/dunitian/p/6658578.html

新方法:修改 /etc/netplan/50-cloud-init.yaml

配置如下:

network:
    ethernets:
        eth0:
            addresses: [192.168.36.202/24]
            gateway4: 192.168.36.1
            nameservers:
                    addresses: [114.114.114.114,180.76.76.76]
    version: 2

重启网络sudo netplan apply

如果网络不正常可以使用:sudo netplan --debug apply

测试一下远程连接

posted @ 2018-09-24 08:39  鲲逸鹏  阅读(17905)  评论(0编辑  收藏  举报