码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 18.04 LTS IP 地址设置

时间:2019-10-09 15:43:05      阅读:103      评论:0      收藏:0      [点我收藏+]

标签:conf   dhcp   nbsp   net   配置文件   ted   div   gate   yam   

和之前的版本不太一样, 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

  

 

Ubuntu 18.04 LTS IP 地址设置

标签:conf   dhcp   nbsp   net   配置文件   ted   div   gate   yam   

原文地址:https://www.cnblogs.com/JiangOil/p/11641903.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!