配置网卡

修改vi /etc/network/interfaces 添加如下

auto eth0 #开机自动启动
iface eth0 inet static #静态IP设置
address 192.168.0.10 #本机IP
netmask 255.255.255.0 #子网掩码
gateway 192.168.0.1 #网关

如果是动态ip,修改配置文件如下

iface eth0 inet dhcp

配置好重启网络命令

网络重启
service networking restart

 本人debian系统与Ubuntu系统都尝试过,都成功。

参考资料:

https://www.cnblogs.com/Sungeek/p/9937049.html

Logo

更多推荐