编辑配置文件:
vim /etc/network/interfaces
参考以下配置:
auto ens18                  # 添加该行
allow-hotplug ens18
iface ens18 inet static     # 改这里
address 192.168.188.40      # 添加该行和以下行
netmask 24
gateway 192.168.188.1
nameservers 114.114.114.114
编辑配置文件:
vim /etc/network/interfaces
参考以下配置:
auto ens18                  # 添加该行
allow-hotplug ens18
iface ens18 inet static     # 改这里
address 192.168.188.40      # 添加该行和以下行
netmask 24
gateway 192.168.188.1
nameservers 114.114.114.114