Ubuntu 18.04 LTS IP 地址设置

ぐ巨炮叔叔 提交于 2019-11-30 21:56:20

和之前的版本不太一样, Ubuntu 18.04 的 ip地址设置是用netplan管理的

 
 
配置文件在:
/etc/netplan/50-cloud-init.yaml

 

示例文件如下:

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens33:
            addresses: [192.168.123.205/24]
            gateway4: 192.168.123.1
            dhcp4: no
            nameservers:
                    addresses: [223.5.5.5,223.6.6.6]
    version: 2

  

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!