ubuntu 16.0.5 修改网卡为固定IP

16.05

sudo vim /etc/network/interfaces
# 修改打开的文件 The primary network interface下的配置
auto enp0s3
# 设置静态方式
iface enp0s3 inet static
# 设置IP地址
address 192.168.0.88
# 设置子网掩码
netmask 255.255.255.0
# 设置网关地址
gateway 192.168.0.1

18.04

vim /etc/netplan/50-cloud-init.yaml

 

原文地址:https://www.cnblogs.com/keewit/p/12067201.html