Home > Article > Operation and Maintenance > How to check the port of linux
The parameters of the netstat command are described as follows:
## All ports and process services on the current server can be displayed. Combined with grep, you can view a specific port and service status.
-t : 指明显示TCP端口
-u : 指明显示UDP端口
-l : 仅显示监听套接字(所谓套接字就是使应用程序能够读写与收发通讯协议(protocol)与资料的程序)
-p : 显示进程标识符和程序名称,每一个套接字/端口都属于一个程序。
-n : 不进行DNS轮询,显示IP(可以加速操作)
netstat -ntlp //查看当前所有tcp端口·
netstat -ntulp |grep 80 //查看所有80端口使用情况·
netstat -an | grep 3306 //查看所有3306端口使用情况·
netstat -lanp
ps -ef |grep mysqld
netstat -pnt |grep :3306 |wc######nmap port scan######
netstat -anp |grep 3306 netstat -an 查看网络端口 lsof -i :port,使用lsof -i :port就能看见所指定端口运行的程序,同时还有当前连接。
The above is the detailed content of How to check the port of linux. For more information, please follow other related articles on the PHP Chinese website!