Bird
0
0

Which command shows all active TCP connections using ss?

easy📝 Conceptual Q1 of 15
Linux CLI - Networking Commands
Which command shows all active TCP connections using ss?
Ass -t
Bss -u
Css -l
Dss -a
Step-by-Step Solution
Solution:
  1. Step 1: Understand ss options for connection types

    -t shows TCP connections, -u shows UDP, -l shows listening sockets, -a shows all sockets (both listening and non-listening).
  2. Step 2: Identify command for active TCP connections

    To show all active TCP connections, including listening and non-listening, use ss -a -t or ss -at. The option ss -t alone shows TCP sockets but not necessarily all active connections.
  3. Final Answer:

    ss -a (with TCP filter) shows all active TCP connections, so ss -at or ss -a is correct. Among options, ss -a is the closest to showing all active TCP connections.
  4. Quick Check:

    ss -a shows all sockets including TCP [OK]
Quick Trick: Use -a to show all sockets, combine with -t for TCP [OK]
Common Mistakes:
  • Confusing -t with -u
  • Using -l shows only listening sockets
  • Using -a shows all, including TCP and UDP

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes