Skip to content

Active ports on your system

Usage

  • To check active ports on a system we use netstat command.
  • To check active TCP ports.

    $netstat -tnlp
    
  • To check active UDP ports.

    netstat -unlp
    
  • Further if you want to check kernel’s routing table.

    netstat -r
    
  • To view active interfaces.

    netstat -i
    

Flags

Flag Description
-t tcp
-u udp
-l listing
-p process id and process name
-n nolookup (it shows IP rather than HostName)
-r routing table
-i interfaces
Back to top