Mac Port occupied and kill port

Source: Internet
Author: User

I have encountered a network port already occupied by other programs when I deployed the Web app on-premises, so I need to exit the process that occupies the port, we can use "terminal" to end the process of consuming a particular port.

1. Open the terminal and use the following command:

lsof-i:****

In the above command, * * * * represents the port number, we first want to know which (or which) processes occupy the port, such as you can run lsof-i:8000, see which process occupies 8000 port, and also show the process ID; We remember the process ID

2. Then use the command "Kill Process ID" to kill the process, such as:

Kill 1011

At this point we will be able to shut down the application that occupies the port.

By:http://www.isofts.org/kill-id/

Mac Port occupied and kill port

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.