Window Commands "Go" through cmd to view port occupancy, corresponding process, kill process, etc.

Source: Internet
Author: User

One, view the ports that are occupied by all processes

At the start-run-cmd, enter: Netstat–ano to view all processes

Second, view the program that occupies the specified port

When you are using Tomcat to publish a program, you often encounter the port is occupied, we want to know which program or process occupies the port, you can use the command netstat–ano|findstr "specify port number" two, to see the program that occupies the specified ports when you are using Tomcat to publish the program, Often encounter the port is occupied, we want to know which program or process occupies the port, you can use the command netstat–ano|findstr "specify port number" two, to see the application of the designated ports

When you are using Tomcat to publish a program, you often encounter the port is occupied, we want to know which program or process occupies the port, you can use the command netstat–ano|findstr "specify port number"

For example: query consumes 8080 port process: netstat-ano|findstr "8080"

Third, kill the related process through the Task Manager
Method One: Use Task Manager to kill a process
Open Task Manager, view, select columns, and then check the PID option, go back to Task Manager to view the corresponding PID, and then end the process

Of course, the above method is sometimes bad, that is, the task manager in the process of more time, and then to find the corresponding process is very troublesome, so there is a way to kill the process of

Method Two: Kill the process with a command
1> first find the process name corresponding to the process number
TASKLIST|FINDSTR Process Number

Example: Tasklist|findstr 3112

2> then kills the process based on the process name
taskkill/f/t/im Process Name
such as: taskkill/f/t/im/javaw.exe

Window Commands "Go" through cmd to view port occupancy, corresponding process, kill process, etc.

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.