Linux has variety of command line utilities that we use to perform our basic tasks whether its networking or administration or anything else. One of the utility that we have mostly used in networking is netstat, We use the network statistics or netstat for troubleshooting or viewing connections and many more. This SS command is another utility which can replace netstat and this command is used to view socket statistics in Linux. It displays information similar to netstat command.
Although It is similar to netstat command that we use in linux but this command gives additional features than netstat. This command can display more information about TCP and state information.
In this blog we will be knowing about the usage of this command to view network connections and how our machine communicates with others.
Several Basic Options-
ss [options] [ FILTER ] 1. ss 2. -t or –tcp 3. -a or –all 4. -e or –extended 5. -u or –udp 6. l or –listening 7. 4 for IPv4 8. 6 for IPv6 9. -v for version 10. -p for --processes 11. -i for --info 12. -m for memory usuage 13. -s for summary
When no option is used this command will displays a list of open non-listening sockets that have established connection.
2. SS -t
Here -t flag is for viewing only TCP connections, TCP stands for transmission control protocol.
3. SS -l
The ‘SS -l (I = Small L) Command is used for viewing listening ports.
4. SS -a
Here this -a flag is used to display both listening and non listening ports with SS command.
5. SS -u
Here using -u flag with SS commands gives us the information of all UDP Connections.
6. SS -e
As you know here -e is for extended i.e this flag gives additional information
7. SS -4
Here this -4 Flag gives the list of all ip4 connections only
8. SS -6
As -4 was for IPv4 conncections, this -6 flag is for IPv6 Connections only.
9. SS -v
with this flag you can get to know about its version
10. SS -m
It displays sockets memory usage information.
11. SS -p
Shows process using the socket.
12. SS -i
It gives information about internal tcp.
13. SS -s
This shows the socket usage summary.
I Hope after reading this Blog you must be having a some knowledge about SS Command and along with that you also had some basic example which you can practice and Explore more on Your Own. With this I would like to Conclude my Article , to explore more you can visit the Man Page of this Command or You can also visit Linux Hint web site. If you liked this Article please like and share, That will motivate me to write more.
Linux man page and https://linuxhint.com/ss-command-linux/