Skip to content

Instantly share code, notes, and snippets.

@kazi331
Last active March 18, 2025 09:04
Show Gist options
  • Save kazi331/1994d5befa94b60cd81bbe4b60218967 to your computer and use it in GitHub Desktop.
Save kazi331/1994d5befa94b60cd81bbe4b60218967 to your computer and use it in GitHub Desktop.
check and kill running process in windows and linux
# for windows
PS C:\Users\sayem> netstat -aon | findstr :3000
TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 12008
TCP [::]:3000 [::]:0 LISTENING 12008
PS C:\Users\sayem> taskkill /PID 12008 /F
SUCCESS: The process with PID 12008 has been terminated.
PS C:\Users\sayem>
#for linux
lsof -i :3000
kill -9 12345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment