mileszs
2/17/2009 - 9:32 PM

gistfile1.sh

# List all listening ports together with the PID of the associated process

sudo netstat -plunt

# -p Tell me the name of the program and it's PID
# -l that is listening
# -u on a UDP port.
# -n Give me numeric IP addresses (don't resolve them)
# -t oh, also TCP ports