mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 17:08:29 +01:00
13 lines
359 B
Text
13 lines
359 B
Text
# To view which users/processes are listening to which ports:
|
|
sudo netstat -lnptu
|
|
|
|
# To view routing table (use -n flag to disable DNS lookups):
|
|
netstat -r
|
|
|
|
# Which process is listening to port <port>
|
|
netstat -pln | grep <port> | awk '{print $NF}'
|
|
|
|
Example output: 1507/python
|
|
|
|
# Fast display of ipv4 tcp listening programs
|
|
sudo netstat -vtlnp --listening -4
|