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 to query port and process information with netstat command

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article shows the specific operation of querying port and process information with the netstat command, and the code is concise and easy to understand, if you encounter this doubt in your daily work. I hope you can find a solution to your questions through this article.

-an all shows all options-t tcp shows only tcp-related processes-u udp only shows udp-related processes-n refuses to show aliases and can display all of the numbers converted to numbers-l lists the service status in listen-p shows the name of the program that establishes the relevant link-r displays routing information, routing table-e shows extended information For example, UID, etc.-s carries out statistics according to each protocol-c executes the netstat command root@2fb0452c56bd:/# netstat-tnulp at regular intervals

The result of running the command:

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

Tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 3851/sshd

Tcp6 0 0: 22: LISTEN 3851/sshd

After reading this article, have you used the netstat command to query port and process information? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.

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

Servers

Wechat

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

12
Report