Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does Linux check port status

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to check the port status of Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to check the port status of Linux".

The parameters of the netstat command are described as follows:

-t: indicates that the TCP port is displayed

-u: indicates that the UDP port is displayed

-l: display only listening sockets (sockets are programs that enable applications to read, write and send and receive protocol and data)

-p: displays the process identifier and program name, and each socket / port belongs to a program.

-n: show IP without DNS polling (operation can be accelerated)

All ports and process services on the current server can be displayed. Combined with grep, you can view a specific port and service.

Netstat-ntlp / / View all current tcp ports

Netstat-ntulp | grep 80 / / View the usage of all ports 80

Netstat-an | grep 3306 / / View the usage of all 3306 ports

Check which services and ports are on a server

Netstat-lanp

Check how many ports a service has. For example, to check mysqld

Ps-ef | grep mysqld

Check the number of connections to a port, such as port 3306

Netstat-pnt | grep: 3306 | wc

Check the connection client IP of a port, such as port 3306.

Netstat-anp | grep 3306

Netstat-an View Network Port

Lsof-I: port, using lsof-I: port, you can see the program running on the specified port, as well as the current connection.

Nmap port scan

Netstat-nupl (port of type UDP)

Netstat-ntpl (port of type TCP)

Netstat-anp displays system port usage

Thank you for your reading, the above is the content of "how to check the port status of Linux". After the study of this article, I believe you have a deeper understanding of how to view the port status of Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report