How do I display ipv4 and ipv6 socket connections using the network command ss?



  • Also see the man page: ss(8) - another utility to investigate sockets

    $ ss -4 state established
    Netid   Recv-Q    Send-Q        Local Address:Port         Peer Address:Port
    tcp     0         64            xx.xx.xx.xx.:ssh        xx.xx.xx.xx:64716
    

    None to display here.

    $ ss -6 state established
    Netid   Recv-Q    Send-Q        Local Address:Port         Peer Address:Port
    
           -4, --ipv4
                  Display only IP version 4 sockets (alias for -f inet).
    
           -6, --ipv6
                  Display only IP version 6 sockets (alias for -f inet6).
    

Log in to reply
 

© Lightnetics 2024