Check the program that occupies a port in ubuntu

Source: Internet
Author: User
In ubuntu, run the netstat command to view port usage. View the connected service port (ESTABLISHED) netstat-a view all service ports (LISTEN, ESTABLISHED) netstat-ap find the window you want to close (such as 8080): netstat

In ubuntu, run the netstat command to view port usage.

View the connected service port (ESTABLISHED)

Netstat-

View all service ports (LISTEN, ESTABLISHED)

Netstat-ap

Find the window you want to close (such as 8080 ):

Netstat-anp | grep 8080

Tcp 0 0 0.0.0.0: 8081 0.0.0.0: * LISTEN 13124/nginx

Then kill-9 13124

In this way, you can close the program that occupies this port.

If you want to view port 8888, enter:

Lsof-I: 8888

To stop the program using this port, use kill + corresponding pid.

Related Article

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.