Categories
Linux Networking shell command

Linux – Check at which port application is running

netstat – Its is a command line tool to get information about network connection.

Run “netstat -tunlp” command to get information about network connection, its can also be used to find application, it’s process id and port its is using, whether post is tcp or udp :

sudo netstat -tunlp

Output:

mmadmin@csiemnms01:~$ sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      32704/systemd-resol
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1990/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      1990/sshd
udp        0      0 127.0.0.53:53           0.0.0.0:*                           32704/systemd-resol
udp6       0      0 :::514                  :::*                                32507/java
Command output

netstat – Its is a command line tool to get information about network connection.

Option have following meaning –

t – show tcp ports
u – show udp ports
n – don’t resolve host name
l – show only port LISTENING
p – show process id

One reply on “Linux – Check at which port application is running”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.