view · edit · sidebar · attach · print · history

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

  • top -U bbmb

Kill all processes found with pgrep

  • pgrep httpd
  • kill -9 $(pgrep httpd)

Check the port a PID is using

  • lsof -Pan -p 30456 -i

pstree

  • pstree

Show when PID started

view · edit · sidebar · attach · print · history
Page last modified on April 16, 2020, at 02:46 PM