zoukankan      html  css  js  c++  java
  • kali no eth0

    情况:没有ip地址,无法联网

    root@arnyeksec:~# ifconfig 
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 176  bytes 13944 (13.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 176  bytes 13944 (13.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    首先查看没启用的端口:

    root@arnyeksec:~# ifconfig -a
    eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
            ether 00:0c:29:6f:51:1e  txqueuelen 1000  (Ethernet)
            RX packets 33  bytes 4639 (4.5 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 63  bytes 5636 (5.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 19  base 0x2000  

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 176  bytes 13944 (13.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 176  bytes 13944 (13.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    发现eth0这个端口没有开启,先修改配置文件(添加后两行):

    root@arnyeksec:~# vim /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
    auto eth0
    iface eth0 inet dhcp

    然后重启网卡:

    root@arnyeksec:~# /etc/init.d/networking restart 
    [ ok ] Restarting networking (via systemctl): networking.service.
    ————————————————
    版权声明:本文为CSDN博主「valecalida」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/valecalida/article/details/88569791

  • 相关阅读:
    (4)Maven快速入门_4在Spring+SpringMVC+MyBatis+Oracle+Maven框架整合运行在Tomcat8中
    (3)Maven快速入门_3在Eclipse中创建Maven项目打包成jar
    (2)Maven快速入门_2maven在Eclipse中的设置
    (1)Maven快速入门_1maven安装
    (11)Microsoft office Word 2013版本操作入门_word中表格操作
    (10)Microsoft office Word 2013版本操作入门_word表格
    洛谷 P2144 [FJOI2007]轮状病毒
    洛谷 P2234 [HNOI2002]营业额统计
    【模板】主席树
    洛谷 P2572 [SCOI2010]序列操作
  • 原文地址:https://www.cnblogs.com/p20050001/p/12560653.html
Copyright © 2011-2022 走看看