World map

 

BM: Baca dalam Bahasa Melayu

World L3: Phone Lines

Ports and listening: ss

You will learn: what a port is, and how to see who answers each one.

Checked with Linux (Debian 13) on 1 Nov 2026

The problem

You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

You are hereyou@kedai:~$

Folder ~

Empty folder

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Phone lines (network) Address 10.0.0.5

Listening ports

  • :22 sshd
  • :80 nginx

A customer dials kedai, extension 8080. The real error says Could not connect to server. Plain words: nobody waits at that extension.

Try it

The IP address reaches the building. The port: An extension number on the shop's phone line. Web is 80, HTTPS 443, SSH 22. picks the extension inside. Some are famous. Match each job to its port.

Drag a card into a box. Or tap the card, then tap the box.

        Watch

        A program waiting by an extension is listening. ss -tln lists them: TCP, listening, numbers. Tap the line for the web counter.

        Tap the line for port 80.

        0 of 1 found

        Try it

        Who answers each port? Add -p for the program names. Only root may see them, so use sudo.

        You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

        You are hereyou@kedai:~$

        Folder ~

        Empty folder

        + 3 hidden (ls -a)

        Services

        • cronrunningstarts at boot
        • sshrunningstarts at boot
        • nginxrunningstarts at boot

        Phone lines (network) Address 10.0.0.5

        Listening ports

        • :22 sshd
        • :80 nginx

        Predict

        You stop nginx. Then you run curl localhost. What happens?

        Pick one answer.

        Try it

        Try it. Stop nginx, look with ss -tln, then start it again.

        You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

        You are hereyou@kedai:~$

        Folder ~

        Empty folder

        + 3 hidden (ls -a)

        Services

        • cronrunningstarts at boot
        • sshrunningstarts at boot
        • nginxrunningstarts at boot

        Phone lines (network) Address 10.0.0.5

        Listening ports

        • :22 sshd
        • :80 nginx

        Check

        True or not?

        Swipe right for good, left for needs work. Or use the buttons.

        1 / 3

        One address can have many ports listening.

        One address can have many ports listening.

        You did it!

        You can now see which ports listen, and who answers them.

        Go deeper (optional)

        ss -tln letters: t TCP, l listening, n numbers, p programs. Add u for UDP. Old guides use netstat; Debian 13 doesn’t install it. /etc/services lists famous port names.

        Real mission

        1. sudo ss -tlnp

        0 of 2 steps done · Your ticks are saved.