Check which process occupies a port number.

Source: Internet
Author: User

1. Windows Platform
Run the following command in the Windows console:
Netstat-nao | findstr" 9010"
TCP 127.0.0.1: 9010 0.0.0.0: 0 listening 3017

 

You can see that a process with a PID of 3017 occupies port 9010. If you want to know its process name, you can use the following command:

Tasklist | findstr" 3017"

 

If you want to kill the process, you can use the method described earlier to kill it in the task manager. But if you like efficiency, you can use the taskkill command.

Taskkill/PID 3017

Then this process will be wiped out :)

 

 

2. Linux

If you are a Linux enthusiast, you should be familiar with this command,

Netstat-Pan | grep 9010

 

 

If you are a little more careful, you will find that all the netsta commands are used. In fact, netstat is a common network statistics command, which is applicable to almost all popular operating systems, whether it is a Linux, window, or other UNIX or Unix-like operating system, the usage is basically the same.

 

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.