In computer networking a port is a logical entity which acts as a endpoint of communication to identify a given application or process on an Linux operating system. It is a 16-bit number (0 to 65535) which differentiates one application from another on end systems.
Below are the different categories of ports:
You can view a list of different applications and port/protocol combination in
/etc/services file in Ubuntu/Arch Linux using
The two most popular Internet transport protocols are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
To list all open ports or currently running ports including TCP and UDP in Ubuntu/Arch Linux, we will use
netstat, is a powerful tool for monitoring network connections and statistics.
-l– prints only listening sockets
-n– shows port number
-t– enables listing of tcp ports
-u– enables listing of udp ports
You can also use
ss command, a well known useful utility for examining sockets in a Ubuntu/Arch Linux system. Run the command below to list all your open TCP and UCP ports: