How Linux can see which process the port is using

Source: Internet
Author: User

How Linux looks at how a port is consumed by which process:

1. Lsof-i: Port number
2. Netstat-tunlp|grep Port number

can see which process is consuming the specified port
"Step One" lsof-i
The lsof-i is used to display conditions that match the condition, and lsof (list open files) is a tool that lists open files for the current system. To execute the lsof-i command as root user,
"Step Two" Lsof-i: Port number
Lsof-i: Port number used to view the occupancy of a port, for example, to view ports 22nd usage, lsof-i:22
"Step three" NETSTAT-TUNLP
NETSTAT-TUNLP is used to display TCP,UDP ports and processes, and other related situations
"Step Four" Netstat-tunlp|grep port number
Netstat-tunlp|grep port number for viewing the process of a specified port number, such as viewing Port 22, Netstat-tunlp|grep 22

Note: The contents of the essay are from the online data collation, for reference only.

How Linux can see which process the port is using

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.