mirror of https://github.com/CrimsonTome/tldr.git
Reworked linux ss page
parent
06706baf31
commit
31c436299f
|
@ -2,26 +2,26 @@
|
||||||
|
|
||||||
> Utility to investigate sockets.
|
> Utility to investigate sockets.
|
||||||
|
|
||||||
- Dump all TCP/UDP/RAW/UNIX sockets:
|
- Show all TCP/UDP/RAW/UNIX sockets:
|
||||||
|
|
||||||
`ss -a {{-t/-u/-w/-x}}`
|
`ss -a {{-t/-u/-w/-x}}`
|
||||||
|
|
||||||
- Show process(es) that using socket:
|
|
||||||
|
|
||||||
`ss -p`
|
|
||||||
|
|
||||||
- Filter TCP sockets by states, only/exclude:
|
- Filter TCP sockets by states, only/exclude:
|
||||||
|
|
||||||
`ss {{state/exclude}} {{bucket/big/connected/synchronized/...}}`
|
`ss {{state/exclude}} {{bucket/big/connected/synchronized/...}}`
|
||||||
|
|
||||||
- Filter sockets by address and/or port:
|
- Show all TCP sockets connected to the local HTTPS port:
|
||||||
|
|
||||||
`ss -t dst 1.2.3.4:80`
|
`ss -t src :{{443}}`
|
||||||
`ss -u src 127/8`
|
|
||||||
`ss -t 'dport >= :1024'`
|
|
||||||
`ss -x "src /tmp/.X11-unix/*"`
|
|
||||||
`ss -t state established '( dport = :ssh or sport = :ssh )'`
|
|
||||||
|
|
||||||
- Only list IPv4 or IPv6 sockets:
|
- Show all TCP sockets along with processes connected to a remote ssh port:
|
||||||
|
|
||||||
`ss {{-4/-6}}`
|
`ss -pt dst :{{ssh}}`
|
||||||
|
|
||||||
|
- Show all UDP sockets connected on a local port within a range:
|
||||||
|
|
||||||
|
`ss -u 'sport >= :{{lowest_port}} and sport <= :{{highest_port}}'`
|
||||||
|
|
||||||
|
- Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16:
|
||||||
|
|
||||||
|
`ss -4t {{192.168/16}}`
|
||||||
|
|
Loading…
Reference in New Issue