查看系统有几块网卡
lspci |grep -i Eth
或者用
ip link
重启网络命令,使用最新的systemctl
systemctl restart networking
编辑网卡配置文件
vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface