linux常用网络命令

一. telnet (测试端口能否连接)

 telnet ip port

二.wget 下载文件(测试下载服务是否正常)

 wget url

三. curl 文件下载 /http请求

1.get请求

curl http://10.12.9.36:91/v2/project/mobile-wealth-home-page  只显示结果

curl -v  http://10.12.9.36:91/v2/project/mobile-wealth-home-page 显示get请求全过程‘

curl -I  http://10.12.9.36:91/v2/project/mobile-wealth-home-page 只显示响应头信息

curl -i  http://10.12.9.36:91/v2/project/mobile-wealth-home-page  显示响应头和结果

2.post请求

curl -d "userId=1000941"  http://10.12.9.36:91/v2/project/mobile-wealth-home-page

3.json格式的post请求(php不支持接收)

curl  -H  "Content-type: application/json" -X POST -d  '{"phone":"13521389587","password":"test"}'  http://domain/apis/users.json

四. netstat 打印网络系统的状态信息

-a或--all:显示所有连线中的Socket;
-c或--continuous:持续列出网络状态;
-h或--help:在线帮助;
-i或--interfaces:显示网络界面信息表单;
-l或--listening:显示监控中的服务器的Socket;
-n或--numeric:直接使用ip地址,而不通过域名服务器;
-p或--programs:显示正在使用Socket的程序识别码和程序名称;
-r或--route:显示Routing Table;
-t或--tcp:显示TCP传输协议的连线状况; -u或--udp:显示UDP传输协议的连线状况; -x或--unix:此参数的效果和指定"-A unix"参数相同;

 

转载于:https://www.cnblogs.com/shijianchuzhenzhi/p/8484998.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值