从前,我使用ifdown eth0来关闭网络适配器。自从我能够使用它已经好几年了,基本上是因为我使用Ubuntu / Debian。
我得到这个:
$ sudo ifdown eth0
ifdown: interface eth0 not configured
如果运行ifconfig,则会得到:
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.20.50 Bcast:192.168.21.255 Mask:255.255.254.0
inet6 addr: fe80::6e3b:e5ff:fe36:2ee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1205280 errors:0 dropped:502 overruns:0 frame:0
TX packets:34930 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:165685286 (165.6 MB) TX bytes:5754120 (5.7 MB)
Interrupt:20 Memory:f7f00000-f7f20000
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:9146 errors:0 dropped:0 overruns:0 frame:0
TX packets:9146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:734342 (734.3 KB) TX bytes:734342 (734.3 KB)
我已经在Google上搜索了如何执行此操作,我发现的所有内容都说运行ifdown eth0。如何在Debian / Ubuntu机器上停止网络适配器?