Spread the love

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)
ss Listing Listening Sockets

02 – How to list all TCP connections?

# List all TCP Connections
ss -t
Code language: PHP (php)
ss List all TCP Connections

03 – How to list all UDP connections?

# List All UDP Connections
ss -ua
Code language: PHP (php)
ss List All UDP Connections

04 – How to display a summary information

# Display Summary Statistics
ss -4
Code language: PHP (php)
ss Display Summary Statistics

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)
ss Filter Connections by Port Number

Here is a quck video on the topic

We hope you enjoyed this article. if that is so please rate this page with the stars bellow and subscribe to our YouTube channel.

Leave a Reply