我的 VmWare 虚拟机中运行着 ubuntu 14.04,但我无法从 VM 连接到互联网。无论是桥接模式还是 NAT 模式,我都无法在 ifconfig 中看到 eth0。我唯一的设置是“网络适配器:NAT”、“已连接”和“开机时连接”均已选中。
xyz@ubuntu:~$ ifconfig
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:65536 Metric:1
RX packets:170 errors:0 dropped:0 overruns:0 frame:0
TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22628 (22.6 KB) TX bytes:22628 (22.6 KB)
xyz@ubuntu:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0c:29:f0:87:76
BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:65536 Metric:1
RX packets:170 errors:0 dropped:0 overruns:0 frame:0
TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22628 (22.6 KB) TX bytes:22628 (22.6 KB)
最佳答案
我将您的问题的答案放在答案中,而不是放在评论中,以便其他通过 Google 找到此问题的人更容易找到。
检查/etc/network/interfaces 文件并确保它包含 eth0(或您的网络接口(interface))的以下两行
auto eth0
iface eth0 inet dhcp
对于您关于 ssh 的问题,请检查客户端和服务器上的所有权限( https://stackoverflow.com/a/6377073/2263949 ),并检查是否可以 ping 通。如果您可以 ping 通,并且权限也正常,但仍然无法连接,请检查防火墙设置。
关于linux - ubuntu 14.04 无法连接网络并找到 eth0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28710188/