Skip to content

Instantly share code, notes, and snippets.

@vasani-arpit
Last active February 3, 2020 11:48
Show Gist options
  • Save vasani-arpit/88f0913992ba13e93048ccf2306d6253 to your computer and use it in GitHub Desktop.
Save vasani-arpit/88f0913992ba13e93048ccf2306d6253 to your computer and use it in GitHub Desktop.
Find process which is using particular port

Windows

Step 1

Run command-line as an Administrator. Then run the below mention command. type your port number in yourPortNumber

netstat -ano | findstr :yourPortNumber

Red coloured circled area shows the PID (process identifier)

Step 2

Then you execute this command after identify the PID.

taskkill /PID typeyourPIDhere /F

P.S. Run the first command again to check if process is still available or not. You'll get empty line if process is successfully ended.

Linux

lsof -i :portNumber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment