$
Learn Linux handbook
en
XP:0
Quest 74Listener
+180 XP

Socket & Connection Stats (netstat & ss)

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

When setting up a database or web server, you must verify that the service is running and listening on the correct port, and check if any unauthorized connections are established. We do this using netstat or ss.

- The netstat (network statistics) command is a classic tool for showing TCP connections and listening ports. E.g. netstat -tuln lists TCP/UDP listening ports.
- The ss (socket statistics) command is the modern, faster alternative to netstat that displays socket connection details directly from the kernel namespace.

Let's audit ports. Check listening TCP/UDP sockets by running netstat -tuln, and then check them using the modern socket statistics command ss -tuln.

Command Syntax Reference

Command / SyntaxDescription
netstat -tulnShow listening TCP/UDP ports using netstat
ss -tulnShow listening sockets using ss

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Run "netstat -tuln"
  • ○
    Run "ss -tuln"

Ready to complete Quest 74?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.