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 check Port usage status and Startup by Linux

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

Share

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

This article mainly explains "Linux how to check port usage status and startup". The explanation 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 "Linux how to check port usage status and startup".

The Netstat-tln command is Linux to check port usage

/ etc/init.d/vsftp start is used to start the ftp port ~!

Look at the file / etc/services

Netstat

Linux View Port View connected Service Port (ESTABLISHED)

Netstat-a

Linux View Port View all service ports (LISTEN,ESTABLISHED)

Sudo netstat-ap

Linux View Port View all service ports and display the corresponding service program name

Nmap < scan type > < scan parameters >

For example:

Nmap localhost

Nmap-p 1024-65535 localhost

Nmap-PT 192.168.1.127-245

When we use netstat-apn to look at network connections, we will find a lot of things like the following:

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

Tcp 0 52 218.104.81.152:7710 211.100.39.250:29488 ESTABLISHED 6111/1

It shows that this server has opened port 7710, so which program does this port belong to? We can use the lsof-I: 7710 command to query:

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

Sshd 1990 root 3U IPv4 4836 TCP *: 7710 (LISTEN) Network Management Alliance bitsCN@com

In this way, we know that port 7710 belongs to the sshd program.

Thank you for reading, the above is the content of "how to check the port usage status and startup of Linux". After the study of this article, I believe you have a deeper understanding of how to check the port usage status and startup 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

Servers

Wechat

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

12
Report