ip配置:ubuntu
终端输入vi /etc/network/interfaces命令编辑配置文件,增长以下内容:
auto enp2s0
iface enp2s0 inet static
address 192.168.1.211
netmask 255.255.255.0
gateway 192.168.1.1rest
重启网卡:sudo service network-manager restartblog
若是重启不生效就重启机器。ip
查看ubuntu版本:配置
cat /etc/*-releasenetwork