linux 网络命令

本文介绍了用于网络诊断和端口检查的重要命令,包括ipconfig用于查看本地IP信息,lsof列出打开的文件和端口,ping检测网络连通性,netstat展示网络连接状态。这些工具帮助用户理解网络连接的状态,识别可能的问题,并确保通信的稳定性。
摘要由CSDN通过智能技术生成

查看本地ip信息

ipconfig

查看开放端口

lsof

list open files

检测对方主机

ping

查看网络连接情况

netstat

fieldcontentdescribe
protoThe protocol (tcp, udp, udpl, raw) used by the socket
Recv-QThe count of bytes not copied by the user program connected to this socket
Send-QThe count of bytes not acknowledged by the remote host
Local AddressAddress and port number of the local end of the socket
Foreign AddressAddress and port number of the remote end of the socket
StateESTABLISHED SYN_SENTThe socket has an established connection
StateSYN_SENTThe socket is actively attempting to establish a connection
StateSYN_RECVA connection request has been received from the network
StateFIN_WAIT1The socket is closed, and the connection is shutting down
StateFIN_WAIT2Connection is closed, and the socket is waiting for a shutdown from the remote end
StateTIME_WAITThe socket is waiting after close to handle packets still in the network
StateCLOSEThe socket is not being used
StateCLOSE_WAITThe remote end has shut down, waiting for the socket to close
StateLAST_ACKThe remote end has shut down, and the socket is closed. Waiting for acknowledgement
StateLISTENThe socket is listening for incoming connections.
StateCLOSINGBoth sockets are shut down but we still don’t have all our data sent
StateUNKNOWNThe state of the socket is unknown
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值