windows command line to view the process kill process

Doing Java development, often a problem occupied the port, many people choose to restart the computer to solve the problem of occupation, but in fact did not need too much trouble, you can directly take up manually kill the process on it.

1. Review of all processes using the port information
Windows Key + R, running in the pop-up window, enter cmd, enter netstat -ano display protocol statistics and current port listening for connections cmd window.

-a displays all connections and listening ports.

-n Display addresses and port numbers in digital form.

-o displays the process ID associated with each connection to have.

If you want to learn to use a command line parameter, you can add the command line behind the /? Ie netstat /?

2. Check the connection information for the specified port
using netstat -ano | findstr "8080", the "|" the results of the previous command as a command input after execution.

 

3. Check the list of processes
using tasklist | findstr "java", to find all processes process name contains the "java", a detailed usage using tasklist / View?.

4. occupying a port number by looking at the process, you can directly kill the process,

Command line using taskkill / PID process ID -F -T

/ PID processid specify the PID to terminate the process.

/ F Specifies the forced termination process.

/ T termination specified and child processes enabled by it


----------------
Disclaimer: This article is CSDN blogger "Lingling small blog" in the original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/qq_35923749/article/details/83786794

Published 296 original articles · won praise 221 · views 540 000 +

Guess you like

Origin blog.csdn.net/qq_36387683/article/details/102746501