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

The method of detecting whether the Port is occupied in linux

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

The command netstat is commonly used in network monitoring. With this command, you can view the services currently monitored and established by the system, as well as the corresponding ports, protocols and other information.

Although there are many netstat parameters, they are not commonly used, mainly the following parameters:

Netstat-[atunlp]

-a: all, which lists all connections, service monitoring, and Socket data

-t: tcp, listing the services of the tcp protocol

-u: udp, which lists the services of the udp protocol

-n: port number, displayed with port number

-l: listening, which lists the current listening services

-p: program, listing the PID of the service program

For example:

Check whether the port number 19090 is occupied, as follows:

Netstat-tunlp | grep 19090

The results show that:

Tcp 0 0 0.0.0 0 19090 0.0.0 0 15 * LISTEN 26596/java

These are the details of how to check whether the port is occupied in linux. Please pay attention to other related articles for more information.

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