preface

During the development process, the port is bound by another application or program, and the port is occupied. Therefore, you need to check which process occupies the port. If an insignificant process occupies the port, you need to kill it to release the port.

The operating environment

  • Windows 10
  • Powershell
  • Task Manager (optional)

steps

  1. Check the process that occupies the port
    netstat -aon | findstr "PORT"
    Copy the code
  2. View information about the process corresponding to the process ID
    tasklist | findstr "PID"
    Copy the code
  3. Shut down the process and free the port
    TASKKILL /PID "PID" /F
    Copy the code

Matters needing attention

  • Step 2 and Step 3 can passTask manager -> The detailed informationCheck the processPIDCorresponding application.
  • Right – click the process and select End task to release the port.