ubuntu 18.04 设置固定ip


image


# 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:
         enp0s3:
             addresses: [192.168.1.81/24,]
             gateway4: 192.168.1.1
             dhcp4: no
             nameservers:
                     addresses: [114.114.114.114]
     version: 2

posted @ 2019-01-13 15:53  csqq  阅读(247)  评论(0编辑  收藏  举报