ubuntu 16.04 网卡配置要点 和查看有几块网卡的命令

ubuntu 16.04 网卡配置要点 和查看有几块网卡的命令

https://blog.csdn.net/taoli1986/article/details/52431596

2016年09月04日 12:12:25 _自由之子_ 阅读数:6148 标签: ubuntu网卡网络 更多

个人分类: ubuntu网络网卡配置

版权声明:本文为自由の力原创文章,未经允许不得转载。 https://blog.csdn.net/taoli1986/article/details/52431596

查看系统有几块网卡

lspci |grep -i Eth
  • 1

或者用

ip link
  • 1

重启网络命令,使用最新的systemctl

systemctl restart networking
  • 1

编辑网卡配置文件

 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
auto enp0s3
iface enp0s3 inet dhcp

auto enp0s8
iface enp0s8 inet static
address 1.1.1.2
mask 255.255.255.0 

猜你喜欢

转载自blog.csdn.net/weixin_41632560/article/details/86555175