In a Linux specific way, how can I get the list of all open UDP ports and all TCP ports currently accepting connections in some interface?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most common way is to use netstat console utility with the following flags:
where:
For additional output options and flags please check man pages
man netstat. Based on your particular needs, only TCP or UDP (for example) protocol connections can be examined:Alternatively,
lsof -imight be helpful.Most likely you are interested in the following information (special /proc filesystem):
/proc – Mount point for the proc filesystem, which gives access to kernel status information via the following files: