How to check my system is listening on a particular port

Hello members

How can i know whether my system is listening on a particular port and what application is using that port.
I would like to know any commands that i can issue to find this out on my system.
Am using Fedora 23 and Linux Mint 17.3 if system specification is required.

Thanks

Hi,
You can use:
netstat command
or
nmap

Try this command my friend.

netstat -luan

i hope this help you.

For system specification use dmidecode it will gives you the handy info about your system like hardware details, serial numbers and BIOS version, Processor etc

Use “netstat” to check the presently using ports.

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 xxx.xxx.xxx.xxx 0.0.0.0:* LISTEN 16297/named
tcp 0 0 xxx.xxx.xxx.xxx:53 0.0.0.0:* LISTEN 16297/named
tcp 0 0 xxx.xxx.xxx.xxx:53 0.0.0.0:* LISTEN 16297/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 16297/named

Hello,

You can use netstat command as below:

$netstat -taln | grep LISTEN
for listing port.
LISTEN: The socket is listening for incoming connections. Such sockets are not included in the output unless you specify the --listening (-l) or --all (-a) option.

$netstat -taln | grep ESTABLISHED
for ESTABLISHED port
ESTABLISHED: The socket has an established connection

Hope this help,

-Tiến

This is the output of the command, i would like to know what the second, third, fourth and fifth columns mean

Proto Recv-Q Send-Q Local Address Foreign Address State

Ya, you can see :slight_smile:

1 Like

@tienphan Many thanks for your help…