Introduction to SS
The ss command is a tool that is used for displaying network socket related information on a Linux system. The tool displays more detailed information that the netstat command which is used for displaying active socket connections.
In this article we are going to explore some of the best ways to use the command for best results.
01 – How to list all of the listening sockets?
# Listing Listening Sockets
ss -l
Code language: PHP (php)

02 – How to list all TCP connections?
# List all TCP Connections
ss -t
Code language: PHP (php)

03 – How to list all UDP connections?
# List All UDP Connections
ss -ua
Code language: PHP (php)

04 – How to display a summary information
# Display Summary Statistics
ss -4
Code language: PHP (php)

05 – How to filter the connections by a port number?
# Filter Connections by Port Number
ss -at '( dport = :443 or sport = :443 )'
Code language: PHP (php)
