出于某种原因,如果我尝试设置静态 IP 地址,我的 eth0 将从ifconfig的输出中消失。我在网关笔记本电脑上运行 Ubuntu 服务器 12.10。
auto eth0
iface eth0 inet dhcp
Run Code Online (Sandbox Code Playgroud)
然后在我运行时给出这个输出ifconfig:
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:b8ff:fee7:f71c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:281 errors:0 dropped:0 overruns:0 frame:0
TX packets:352 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:31874 (31.8 KB) TX bytes:45369 (45.3 KB)
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:430 errors:0 dropped:0 …Run Code Online (Sandbox Code Playgroud)