2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-15 06:12:59 +00:00
cheat.sheets/sheets/ss

31 lines
815 B
Plaintext
Raw Normal View History

# ss
# Another utility to investigate sockets
2017-05-26 06:14:21 +00:00
# Options:
# -4/-6 list ipv4/ipv6 sockets
# -n numeric addresses instead of hostnames
2017-05-26 06:17:36 +00:00
# -l list listening sockets
2017-05-26 06:14:21 +00:00
# -u/-t/-x list udp/tcp/unix sockets
# -p Show process(es) that using socket
# Show all listening TCP ports, including the corresponding process.
2017-05-26 06:14:21 +00:00
ss -tlp
# Show a summary of all ports connecting to 192.168.2.1 via port 80.
2017-05-26 06:14:21 +00:00
ss -t dst 192.168.2.1:80
# Show all SSH-related connection.
#
# Documentation on the filter syntax can be installed via the following command
# if on a Debian- or Ubuntu-based distribution of Linux:
#
# sudo apt-get install iproute2-doc
#
2017-05-26 06:14:21 +00:00
ss -t state established '( dport = :ssh or sport = :ssh )'
# Display timer information.
ss -tno
2017-05-26 06:14:21 +00:00
# Filter connections by TCP state.
2017-05-26 06:14:21 +00:00
ss -t4 state established