Skip to content

Instantly share code, notes, and snippets.

@pablocattaneo
Last active May 21, 2019 14:28
Show Gist options
  • Save pablocattaneo/8d9e54d571483f8367d31716f42a0d88 to your computer and use it in GitHub Desktop.
Save pablocattaneo/8d9e54d571483f8367d31716f42a0d88 to your computer and use it in GitHub Desktop.
netstat -nap|grep 3000
# returns list process using port 3000 last column show id of this process
# tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 11249/node
# tcp 0 0 127.0.0.1:3000 127.0.0.1:35804 ESTABLISHED 11249/node
# tcp 0 0 127.0.0.1:35804 127.0.0.1:3000 ESTABLISHED 2392/chrome --type=
# tcp 0 0 127.0.0.1:3000 127.0.0.1:35746 ESTABLISHED 11249/node
# tcp 0 0 127.0.0.1:35878 127.0.0.1:3000 ESTABLISHED 2392/chrome --type=
# tcp 0 0 127.0.0.1:3000 127.0.0.1:35878 ESTABLISHED 11249/node
# tcp 0 0 127.0.0.1:35746 127.0.0.1:3000 ESTABLISHED 2392/chrome --type=
kill -9 11249
#kills process 11249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment