Thursday, October 27, 2016

Which port is opened in my Linux system ?

netstat command can be used to know all ports opened currently.

command 

netstat  <option>

option:
-a                              short form of '--all'
-t or --tcp                  for tcp connection
-u or --udp                for udp connection
-n                              for numeric presentation

Example

netstat -atn                     for all tcp connection
netstat -aun                    for all udp connection

netstat -ltn                     for all ACTIVE tcp connections
netstat -lun                     for all ACTIVE udp connections

2 comments: