CentOS Debian Mint openSUSE Red Hat Ubuntu

SS Command in Linux

SS Command in Linux

Introduction

ss is a command used to get information about network connections. It is very easy during the troubleshooting process about the connection.

ss is a command equivalent to netstat command. It will display detailed information on how your machine interacts with other networks, services, and network connections.

Below is the guide on how to use the ss command in Linux.

The function of ss command

1. To list network connections

$ ss

Output:

2. To list listening sockets

$ ss -l

Output:

3. To list all sockets

$ ss -a

Output:

4. To list TCP sockets

Here we want to list TCP sockets, so we will use -t option:

$ ss -a -t

Output:

5. To list UDP sockets

We will use -u option:

$ ss -a -u

Output:

6. To list UNIX sockets

We will use -x option:

$ ss -a -x

Output:

7. To list Raw sockets

We will use -w option:

$ ss -a -w

Output:

8. To list IPV4 Sockets

We will use -4 option:

$ ss -a -4

Output:

9. To list IPV6 Sockets

We will use -6 option:

$ ss -a -6

Output:

Conclusion

You’ve already gone through the details of how to use the ss command in Linux.

Thanks for reading.

Similar Posts