kali linux 网卡配置出错 RTNETLINK answers: File exists

虚拟机使用kali linux 通过桥接方式和主机通信,需要保证ip 在同一网段,子网掩码,默认网关,DNS服务器地址相同

1)修改网卡配置文件:

vi /etc/network/interfaces

在这些语句下面

auto lo
iface lo inet loopback

添加如下内容:注意和主机的ip地址同一网段,默认网关一致

auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
gateway xxx.xxx.xxx.xxx

2)DNS服务器也要保证一致

vi /etc/resolv.conf

添加

nameserver  xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

3)重启网卡

/etc/init.d/networking restart

也可以使用如下命令:

service networking restart

出现如下错误

[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "j
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值