我离开了 Ubuntu 并在一段时间后回来,所以我不记得太多了。现在我正在尝试获取我的 IP 地址。我从跑步ifconfig中得到的只是
eth0 Link encap:Ethernet HWaddr 3c:97:0e:11:22:0d
UP 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)
Interrupt:20 Memory:f2500000-f2520000
Run Code Online (Sandbox Code Playgroud)
(顺便说一句,我真的不明白什么UP BROADCAST MULTICAST意思。)
$ sudo ifdown eth0
ifdown: interface eth0 not configured
Run Code Online (Sandbox Code Playgroud)
然后
$ sudo ifup eth0
Ignoring unknown interface eth0=eth0
Run Code Online (Sandbox Code Playgroud)
最后2:
$ ip addr show eth0
eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN
group default …Run Code Online (Sandbox Code Playgroud)