ubuntu设置网络

#######################设置网络#######################
#执行命令
vim /etc/netplan/50-cloud-init.yaml
#更改内容
network:
    ethernets:
        ens33:
            addresses: [192.168.0.66/24]
            gateway4: 192.168.0.1
            dhcp4: true
            optional: true
    version: 2
#执行命令
netplan apply

#执行命令
vim /etc/resolv.conf
#更改内容
114.114.114.114

posted @ 2019-01-30 17:46  甜咖啡06  阅读(154)  评论(0编辑  收藏  举报