[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to list all the processes that hold the ports and it's pid

Posted on 2007-08-05
3
Medium Priority
?
220 Views
Last Modified: 2010-04-20
hi all,
#nmap -sT localhost
lists all the open ports and it's associated service/process
how can I make it display
all open ports and it's associated service/process and the service/process pid
thanks in advance
best regards
HG
0
Comment
Question by:shang3000
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
alextoft earned 2000 total points
ID: 19635019
How about netstat -aptu

a - listening
p - process
t - tcp
u - udp

you can also add n to stop it trying to resolve hostnames (quicker).
0
 
LVL 19

Expert Comment

by:alextoft
ID: 19635024
Correction, that should be l for listening, not a, so
netstat -lpntu
0
 
LVL 27

Expert Comment

by:Jason Watkins
ID: 19635258
Hi,

ps -ax will show all running processes & what not.

/F
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question