adb shell网络命令nestat、ping、netcfg、ip操作实例解释
2017-03-16 09:12
1536 查看
网络命令(NetWork)
1. adb shell netstat
网络统计。用来查看网络当前状态:2. adb shell ping
测试两个网络间的连接和延迟。ping命令的格式如下:ping[-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
[-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
[-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
[-w deadline] [-W timeout] [hop1 ...] destination
部分参数解释可以参考链接:http://blog.csdn.net/henni_719/article/details/62232781
使用-c参数:adb shell ping -c 4 www.baidu.com,ping4次后停止ping:
3. adb shell netcfg
通过配置文件配置和管理网络连接。命令行格式:netcfg [<interface>{dhcp|up|down}]由于手机是6.0版本,提示该命令不存在。无法演示。通过查阅,要获取Android手机的IP地址,必须先保证你的Android手机已经连接到无线网络(此处的无线网络包括WiFi和WAPI,不包括3G或2G的移动网络)。执行如下命令:
先执行命令"adb shellnetcfg"
再执行命令 “adb shell ifconfigrmnet0”
不过如果想查询WiFi的IP地址,可以通过ip命令:adb shell ip -f inet addr show wlan0
4.adb shell ip [OPTIONS] OBJECT
显示,操纵路由,设备,路由策略和隧道OBJECT := { link | addr | addrlabel |route | rule | neigh | ntable |tunnel | tuntap | maddr | mroute | mrule |monitor | xfrm |netns | l2tp }
OPTIONS := {-V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |-f[amily] { inet | inet6| ipx | dnet | link } |-l[oops] { maximum-addr-flush-attempts } |-o[neline] |-t[imestamp] | -b[atch] [filename] |-rc[vbuf] [size]}
关于解释和示例可参考链接:http://blog.csdn.net/henni_719/article/details/62416420
相关文章推荐
- adb shell网络命令nestat、ping、netcfg、ip操作实例解释
- 主机地址linux网络编程之TCP/IP基础(二):利用ARP和ICMP协议解释ping命令
- linux网络编程之TCP/IP基础(二):利用ARP和ICMP协议解释ping命令
- [shell]通过ping检测整个网段IP的网络状态脚本
- Linux-网络操作相关命令--ping;netstat
- adb shell top 命令中几个内存信息的解释 【RSS,PSS,USS,VSS】 native,dalvik内存
- android——adb shell——netcfg——get IP address
- adb文件管理命令操作实例讲解
- 第3章 shell结构化命令------------( 双圆括号命令及操作实例)
- 第3章 shell结构化命令------------( 双方括号命令及操作实例、case命令)
- 在 shell 脚本获取 ip、数字转换等网络操作
- adb shell dumpsys [options]操作实例讲解-----(一)
- Shell脚本检查IP格式及mysql操作实例
- 利用ping命令检测网络的Shell程序
- Android系统开发常用shell命令汇总+vim中复制操作+adb logcat过滤
- Linux-网络操作相关命令--ifconfig;ip
- [shell]通过ping检测整个网段IP的网络状态脚本
- adb shell dumpsys [options]操作实例讲解-----(一)
- DOS下常用网络命令解释大全Ping
- 第3章 shell结构化命令------------( 双方括号命令及操作实例、case命令)