Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, how to you get a list of all the ports on your machine that currently have services listening on them? (make sure when you issue command, you list all relevant flags, and to list all listening tcp and udp ports)
Answer

sudo netstat -tupln


^^ running as sudo gives you more results (especially for getting PIDs)
^^^ t flag is for tcp
^^^^ u flag is for udp
^^^^^ p flag is to get the PID of the service listening on that particular port
^^^^^^ l flag is to list all listening ports
^^^^^^^ n flag is so there is no name resulotion for ports, so you get output like "0.0.0.0:80" and not "0.0.0.0:http"


Question
In linux, how to you get a list of all the ports on your machine that currently have services listening on them? (make sure when you issue command, you list all relevant flags, and to list all listening tcp and udp ports)
Answer
?

Question
In linux, how to you get a list of all the ports on your machine that currently have services listening on them? (make sure when you issue command, you list all relevant flags, and to list all listening tcp and udp ports)
Answer

sudo netstat -tupln


^^ running as sudo gives you more results (especially for getting PIDs)
^^^ t flag is for tcp
^^^^ u flag is for udp
^^^^^ p flag is to get the PID of the service listening on that particular port
^^^^^^ l flag is to list all listening ports
^^^^^^^ n flag is so there is no name resulotion for ports, so you get output like "0.0.0.0:80" and not "0.0.0.0:http"


Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.