Linux cheatsheet
ss -ltup
The command "ss -ltup" is used to display listening TCP and UDP network sockets on a Linux system. Here's a breakdown of the options and output of the command:
-l
: Lists only listening sockets.-t
: Shows TCP sockets.-u
: Shows UDP sockets.-p
: Shows the process or program name associated with each socket.
The output will typically include the following information for each listening socket:
State: The current state of the socket (e.g., LISTEN, ESTABLISHED).
Recv-Q: The number of bytes in the receive queue.
Send-Q: The number of bytes in the send queue.
Local Address: The IP address and port number the socket is listening on.
Peer Address: The IP address and port number of the remote connection (only applicable for established connections).
Process/Program: The name or ID of the process or program associated with the socket.
Note that the output will vary depending on the system and the processes running on it. Running the command with appropriate privileges (e.g., as root or using sudo) may be necessary to see all the information.