$ ifconfig -a
展示全部网卡
$ ifconfig enp2s0 up
启用网卡enp2s0
$ sudo vi /etc/network/interfaces
输入
auto enp2s0
iface enp2s0 inet static
address 192.168.2.10
netmask 255.255.255.0
gateway 192.168.2.1
完成网卡配置
$ ifconfig -a
展示全部网卡
$ ifconfig enp2s0 up
启用网卡enp2s0
$ sudo vi /etc/network/interfaces
输入
auto enp2s0
iface enp2s0 inet static
address 192.168.2.10
netmask 255.255.255.0
gateway 192.168.2.1
完成网卡配置