Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'View currently open network connections' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View currently open network connections
Authored by: Sesquipedalian on Jul 07, '11 08:49:57AM

Specifically, the command would be lsof -i | grep -E "(LISTEN|ESTABLISHED)". Just clarifying for those not familiar with regular expressions.

And I agree that there is no need to run a root process just to do this.

[ Reply to This | # ]

View currently open network connections
Authored by: gidds on Jul 07, '11 12:32:46PM

Actually, it may be worth running lsof as root (e.g. by prefixing the command with sudo), because otherwise, it'll only show connections to processes running as your user.

But I fully agree with the principle; a simple task like this shouldn't need fancy scripts, and installing something like that as root, especially if it auto-updates, could be extremely dangerous.


[ Reply to This | # ]