Linux 测试IP和端口

wget [ip]:[port]

➜  ~ wget 127.0.0.1:6379
--2019-07-03 13:57:43--  http://127.0.0.1:6379/
正在连接 127.0.0.1:6379... 已连接。
已发出 HTTP 请求,正在等待回应... 200 没有 HTTP 头,假定为 HTTP/0.9
长度:未指定
正在保存至: “index.html”

index.html                                                              [                         <=>                                                                                                                                        ]     407  --.-KB/s

ping -c [port] [ip]

➜  ~ ping -c 6379 localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.039 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.126 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.093 ms
按Ctrl+C //退出命令
--- localhost ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.039/0.086/0.126/0.031 ms

Ctrl+C 退出正在执行的命令

Logo

更多推荐