zoukankan      html  css  js  c++  java
  • 虚拟机中的kali linux没有了eth0,只有lo接口了怎么办

    问题如下:,没有了eth0

    root@kali:~# 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 1  (Local Loopback)
            RX packets 70  bytes 3638 (3.5 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 70  bytes 3638 (3.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    首先启动eth0

    ifconfig eth0 up

    之后在/etc/network/interfaces文件中加入

    iface eth0 inet dhcp

    最后重启网络

    service networking restart 

    或者interfaces写成静态ip也行

    iface eth0 inet static  
        address 192.168.***.***
        netmask 255.255.255.0

    最后perfect

    root@kali:~# ifconfig 
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.***.***  netmask 255.255.255.0  broadcast 192.168.145.255
            inet6 fe80::20c:29ff:fe9f:cc2d  prefixlen 64  scopeid 0x20<link>
            ether 00:0c:29:9f:cc:2d  txqueuelen 1000  (Ethernet)
            RX packets 770  bytes 341112 (333.1 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 298  bytes 33286 (32.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    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 1  (Local Loopback)
            RX packets 72  bytes 3716 (3.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 72  bytes 3716 (3.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • 相关阅读:
    LVS安装配置
    Ansible自动化运维工具的使用
    DHCP中继配置
    简单爬虫
    zlib1.2.8 编译小记
    varnish 4.0编译安装小记
    imdisk命令行使用及配置
    How to say all the keyboard symbols in English and Chinese
    qwt6在Windows下Qt5的编译,安装,初步使用
    4MLinux7.0 服务器配置详解 别名TheSSS
  • 原文地址:https://www.cnblogs.com/cnsec/p/13286484.html
Copyright © 2011-2022 走看看