windows query and close the occupied port

1. Run cmd with administrator privileges.

2. Find the occupied port, such as 8886

netstat -ano | findstr 8886

Query the pid of the program occupying this port. In this example, the last item 12596 is the PID of the program.

3. Close the process

taskkill -PID 12596 -F

Guess you like

Origin blog.csdn.net/weixin_34910922/article/details/128795165