Monitor Network with netstat command in Linux

Windows Articles

Is ReactOS a real alternative to Windows?

Oh! The eternal struggle of computer operating systems. Windows vs. GNU/Linux and Mac as a distant spectator However, there are also interesting...

How to install Firebird on Ubuntu 20.04/ 18.04?

Database management systems are sufficient for many kinds of projects. Of course, they abound with MySQL / MariaDB or PostgreSQL popular but...

How to disable Firewall in Windows Server 2019/2016

Hello! The Firewall performs an essential security task on any version of Windows Server. In fact, it has the mission of preventing...

How to install ArangoDB on Ubuntu 20.04?

In this post, you will learn how to install ArangoDB on Ubuntu 20.04 So let's go for it What...

How to create GPO in Windows Server 2019.

Hi, in today's post we will be looking at GPOs in Windows Server 2019. The Group Police Object are a set of...
Muhammad Nabeel
Muhammad Nabeel
Network and System Administrator

netstat (network statistics) is a command-line network tool that displays network connections for Transmission Control Protocol (both incoming and outgoing). It is also monitor routing tables, number of network interface and protocol statistics. netstat is available on Linux operating systems.

We can use it for finding problems in the network and to determine the amount of traffic on the network as a performance measurement. It is very useful tool for monitoring and diagnosing connection problems.

Intsall netstat

In case, you are unable to use netstat command, use below command to install it.

yum install -y net-tools

Now it is installed and ready to use.
Below are some useful commands to monitor network connections.

Display network interfaces

You can run below command to see all available network interfaces on the server.

netstat -i

Print all TCP and UDP listening Ports

Now, if you want to see all listening ports on the server, use below command.

netstat -a | more

List only TCP Ports connections

so, issue following command to see all TCP connections.

netstat -at

Show only UDP Ports connections

Then, run following command to see all UDP connections.

netstat -au

List services names with PID

Then, see all services with their process ID’s

netstat -pt

Display kernel routing information

Use below command so you can see kernel routing information.

netstat -r

Print Netstat Information Continuously

netstat -c

Finding Listening service

Note: Replace ssh with your service name.

netstat -ap | grep ssh

That’s it, to get more information and options about netstat command read manual for netstat command using “man netstat” command

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Is ReactOS a real alternative to Windows?

Oh! The eternal struggle of computer operating systems. Windows vs. GNU/Linux and Mac as a distant spectator However, there are also interesting...

How to install Firebird on Ubuntu 20.04/ 18.04?

Database management systems are sufficient for many kinds of projects. Of course, they abound with MySQL / MariaDB or PostgreSQL popular but...

How to disable Firewall in Windows Server 2019/2016

Hello! The Firewall performs an essential security task on any version of Windows Server. In fact, it has the mission of preventing...

How to install ArangoDB on Ubuntu 20.04?

In this post, you will learn how to install ArangoDB on Ubuntu 20.04 So let's go for it What...

How to create GPO in Windows Server 2019.

Hi, in today's post we will be looking at GPOs in Windows Server 2019. The Group Police Object are a set of...