• WIN7 系统中安装的VMware Workstation+Ubuntu 10.04 上网配置


    原文参见:http://www.cnblogs.com/sophine/archive/2012/04/26/2471227.html

    1  其中第6步:“sudo gedit /etc/networking/interfaces 此时便可以在文本编辑器中编写文件中的内容,要方便多”

        语句应为 sudo gedit /etc/network/interfaces

    2  文件中内容应为:

       将文件里的内容改为:(不可把一行语句拆分为两行)

    auto  eth0

    iface  eth0 inet static

    address 192.168.137.128

    netmask 255.255.255.0

    gateway  192.168.137.2

    3  使用下面的命令使网络设置生效

        sudo  /etc/init.d/networking restart

    若报下面的错误

    SIOCSIFADDR: No such device
    eth0: ERROR while getting interface flags: No such device
    eth0: ERROR while getting interface flags: No such device
    Bind socket to interface: No such device
    Failed to bring up eth0.
    

    使用ifconfig -a看我们拥有的网络设备,发现网卡名字并不是eth0,而是别的

    我们只需要删除下面的文件
    rm /etc/udev/rules.d/70-persistent-net.rules

    然后,重启linux就可以把网卡名变回eth0了。之后再使用下面的命令使网络设置生效

        sudo  /etc/init.d/networking restart 即可配置成功。

    囧的是配置成功了,虚拟机里的ubuntu系统还是连不上网,试了各种方法都不行,估计是丢失了重要的网卡文件,只好卸载重装虚拟机和系统,这篇就当记录下这几个小时的瞎折腾吧~

  • 相关阅读:
    concurrent模块
    gevent模块
    Python中的线程
    2019.10.22 用TCP实现服务端并发接收
    Python中的进程
    进程和线程
    网络编程常用模块及方法
    [UOJ #222][NOI2016]区间(线段树)
    [BZOJ 4873][SHOI&SXOI2017]寿司餐厅(最大权闭合子图)
    [BZOJ 3751][NOIP2014]解方程(哈希)
  • 原文地址:https://www.cnblogs.com/weilin1216/p/3076515.html
Copyright © 2020-2023  润新知