How to list current network connection

It’s often needed while installing a server to check the current network connection. Their is a tools in both Windows and Linux OS but the option are quite different.

Here after a sample that list current TCP listening (server side) connection with it’s associated process ID for Linux and Windows OS.

Linux:

[lolo@dellxps ~]$ netstat -lp --tcp

Windows:

C:\>netstat -abf -p tcp

To test if a particular port is open (here LDAP 389)

Linux:

[lolo@dellxps ~]$ netstat -ltnp | grep :389

Windows:

C:\>netstat -aon | findstr 389

Feel free to use “netstat /?” on windows or the man pages on Linux for more option details.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: