Article directory
1. Win+r opens the cmd window
2. Find the pid number of the occupied port, such as port 8080
Input command: If there is the following output, it means that the current port is being occupied, remember the last number, which is the pid process number of the current portnetstat -aon|findstr "8080"
3. Kill the current pid process by command
Input command: After entering the command, it will prompt that the process with PID 16712 has been terminated. When passing the second step of query, if there is no output, it means that the current port has been releasedtaskkill /pid 16712 /f
Summarize
It is very annoying that the port number is occupied. This article kills the process in one step through the cmd window.