在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
测试一下远程连接
原文地址:https://www.cnblogs.com/dotnetcrazy/p/9694699.html
时间: 2024-11-09 04:36:06