Filter the port number used by the service through the name of the service

Source: Internet
Author: User

Filter the port number used by the service through the name of the service


# netstat-upnl|grep NTPD I This command is to filter out the UDP port number of the NTP service


DP 0 0 172.16.1.4:123 0.0.0.0:* 9591/ntpd

UDP 0 0 127.0.0.1:123 0.0.0.0:* 9591/ntpd

UDP 0 0 0.0.0.0:123 0.0.0.0:* 9591/ntpd

UDP 0 0 fe80::e61f:13ff:fe3:123:::* 9591/ntpd

UDP 0 0:: 1:123:::* 9591/ntpd

UDP 0 0::: 123:::* 9591/ntpd


-U (UDP) displays only UDP-related options

-T (TCP) displays only TCP-related options

-P Displays the program name that establishes the associated link

-N refuses to display aliases, showing all numbers converted to numbers.

-l list only service status in Listen (listening)

This article is from the "david0512" blog, make sure to keep this source http://gjr0512.blog.51cto.com/6518687/1728301

Filter the port number used by the service through the name of the service

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.