刘功瑞的博客

有一天你突然惊醒,发现这一切,都只不过是一场梦。

kali中eth0网卡突然消失的解决方案

前言

不知道怎么kali的eth0网卡突然消失了。这可有点难受啊。在网上查找了一番找到了解决办法,特此记录。

问题


这里写图片描述 
怎么办?

解决办法

首先使用ifconfig -a命令查看所有的网卡接口 

这里写图片描述 
发现存在eth0网卡,但是没有ip地址。所以我们需要在网络接口配置文件中进行设置。 
查看/etc/network/interfaces文件,发现只有lo网卡的配置 

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

这里写图片描述 
所以发现了问题的所在,那么添加对应的eth0网卡的配置即可,既可以配置dhcp也可以使用静态ip地址。 
这里写图片描述 
之后重启一下networking服务即可

/etc/init.d/networking restart

再次查看ip发现恢复正常了。 
这里写图片描述

总结

所以呢,遇到问题不要慌!


发表评论:

Powered By Z-BlogPHP 1.5.2 Zero

Copyright www.liugongrui.com.All Rights Reserved.