Ubuntu.配置静态IP
登录环境,进入端口配置路径,interfaces指定导入interfaces.d文件夹下的cfg文件
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg
进入配置文件夹,使用默认配置文件,也可以删除自己定义配置文件
cd /etc/network/interfaces.d
cat 50-cloud-init.cfg
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's