根据[url]http://forum,ubuntu.org.cn/viewtopic.php?f=116&t=472965[/url]
此帖的回复,在终端运行的命令及结果如下:
代码: 全选
~$ sudo nmcli dev show
[sudo] password for carl:
Usage: nmcli device { COMMAND | help }
COMMAND := { status | list | disconnect | wifi }
status
list [iface <iface>]
disconnect iface <iface> [--nowait] [--timeout <timeout>]
wifi [list [iface <iface>] [bssid <BSSID>]]
wifi connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [iface <iface>] [bssid <BSSID>] [name <name>]
[--private] [--nowait] [--timeout <timeout>]
错误:'dev' 命令 'show' 无效。
~$ ping -c 2 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
--- 114.114.114.114 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1008ms
~$ ping -c 2 mirrors.163.com
ping: unknown host mirrors.163.com
~$ sudo dhclient -v eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/34:17:eb:5f:a5:c9
Sending on LPF/eth0/34:17:eb:5f:a5:c9
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0xd0acaa69)
DHCPREQUEST of 192.168.3.104 on eth0 to 255.255.255.255 port 67 (xid=0x69aaacd0)
DHCPOFFER of 192.168.3.104 from 192.168.3.1
DHCPACK of 192.168.3.104 from 192.168.3.1
RTNETLINK answers: File exists
bound to 192.168.3.104 -- renewal in 3214 seconds.
~$ sudo ifconfig -a
eth0 Link encap:以太网 硬件地址 34:17:eb:5f:a5:c9
inet 地址:192.168.3.104 广播:192.168.3.255 掩码:255.255.255.0
inet6 地址: fe80::3617:ebff:fe5f:a5c9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:4270 错误:0 丢弃:10 过载:0 帧数:0
发送数据包:1992 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:343646 (343.6 KB) 发送字节:189720 (189.7 KB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:4458 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:4458 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:369262 (369.2 KB) 发送字节:369262 (369.2 KB)
wlan0 Link encap:以太网 硬件地址 30:3a:64:58:35:e0
inet6 地址: fe80::323a:64ff:fe58:35e0/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:13267 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:14937 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:9635273 (9.6 MB) 发送字节:2123471 (2.1 MB)
~$ sudo iwconfig
eth0 no wireless extensions.
wlan0 IEEE 802.11abgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
lo no wireless extensions.
~$ sudo route -nv
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth0
192.168.3.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
~$ sudo lshw -C network
*-network
description: Ethernet interface
product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: eth0
version: 07
serial: 34:17:eb:5f:a5:c9
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8106e-1_0.0.1 06/29/12 ip=192.168.3.104 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:44 ioport:4000(size=256) memory:b0b00000-b0b00fff memory:b0800000-b0803fff
*-network
description: Wireless interface
product: Wireless 3160
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 83
serial: 30:3a:64:58:35:e0
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=3.19.0-25-generic firmware=25.17.12.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
resources: irq:48 memory:b0a00000-b0a01fff
~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 202.96.134.133
nameserver 202.96.128.68
nameserver 127.0.1.1