今天重装了vmware后,再次使用原来的Ubuntu7.10文件,找不到网络连接。web@Ubuntu8:~$ ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:ED:F3:C2
inet addr:0 Bcast:0 Mask:0
Interrupt:16 Base address:0x2000 lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)sudo 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).# The loopback network interface
auto lo
iface lo inet loopback# The primary network interface
auto eth0
iface eth0 inet dhcp
原来是新旧vmware的网卡不一样,将eth0改为eth1,重启网络
sudo /etc/init.d/networking restart
一切OK了顺便讲一下/etc/network/interfaces
如果是配置eth为静态IP
(比如192.168.1.1)并且指定网关(如192.168.1.254),那么如此配置:
auth eth0
iface eth0 inet staticaddress 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
如果是手动指定IP并且还需要访问互联网,比如wget下载,那么还需要设置DNS:
$sudo pico /etc/resolv.conf向这里添加配置内容:nameserver xxx.xxx.xxx.xxx保存即可。 Ubuntu上安装astro的问题及解决Ubuntu NetBeans安装后出现乱码的解决相关资讯 VMWARE Ubuntu技巧
- VMware在DockerCon EU宣布开源“ (12/03/2015 13:13:26)
- 使用VMware克隆功能的一个网络配置 (08/13/2015 20:51:48)
- VMware推出容器友好的Linux系统 (04/21/2015 11:51:51)
| - VMware Workstation 12 Pro 发布下 (08/26/2015 19:21:49)
- VMware推出自家Linux版本 Photon (04/22/2015 17:27:21)
- VMware如何在中国取得成功? (04/20/2015 17:18:00)
|
本文评论 查看全部评论 (0)