Netstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc. List All Ports (both listening and non listening ports) #netstat -a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
root@localhost:~# <strong>netstat -a</strong> | more Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:mysql *:* LISTEN tcp 0 0 *:http *:* LISTEN tcp 0 0 *:ftp *:* LISTEN tcp 0 0 *:ssh *:* LISTEN udp 0 0 *:openvpn *:* Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 8963 /var/run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 9988 /var/run/mysqld/mysqld.sock unix 2 [ ACC ] STREAM LISTENING 10048 private/proxymap |
List all tcp ports #netstat -at
1 2 3 4 5 6 7 |
root@localhost:~# <strong>netstat -at</strong> Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:mysql *:* LISTEN tcp 0 0 *:http *:* LISTEN tcp 0 0 *:ftp *:* LISTEN tcp 0 0 *:ssh *:* LISTEN |
Find