Ports and Processes
<< xorg | Index | Iptables >>
Grep for process on port
- sudo netstat -nlp | grep :* | grep 8007
Show all open ports
- sudo netstat -nlp | grep :*
Use lsof to check a port
- lsof -iUDP
- lsof | grep perl
- lsof -w -n -i tcp:34157
- lsof -p 8260 | grep TCP
- lsof -i -n | grep "65.12.77.123"
top all processes of a User
Kill all processes found with pgrep
- pgrep httpd
- kill -9 $(pgrep httpd)
Check the port a PID is using
pstree
Show when PID started