Type "netstat -a -n" at the command prompt, and then press Enter to view the port number and status of TCP and UDP connections displayed in digital form.
The Netstat command is used as follows:
Command format: netstat-a-e-n-o-s-an.
-a shows all active TCP connections and TCP and UDP ports that the computer listens to.
-e indicates the number of bytes and packets sent and received by Ethernet.
-n indicates that only the addresses and port numbers of all active TCP connections are displayed in digital form.
-o displays the active TCP connections, including the process ID(PID) of each connection.
-s indicates that statistics of various connections, including port numbers, are displayed by protocol.
-View all open ports
The method of viewing ports under LINUX;
It is suggested to check with nmap. "nmap 127.0.0. 1" can be installed with yum nmap if it is not installed.