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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx
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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx
Hint
Without sudo, the process column stays empty.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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx
Check
True or not?
Swipe right for good, left for needs work. Or use the buttons.
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
sudo ss -tlnp
0 of 2 steps done · Your ticks are saved.
Bahasa Melayu
Seorang pelanggan dail kedai, sambungan 8080. Ralat sebenar kata Could not connect to server. Maksudnya: tiada siapa menunggu di sambungan itu.
Alamat IP sampai ke bangunan. Port pilih sambungan di dalamnya. Ada yang terkenal. Padankan setiap kerja dengan port.
Program yang menunggu di satu sambungan sedang listening (mendengar). ss -tln senaraikannya: TCP, mendengar, nombor. Tekan baris untuk kaunter web.
Siapa menjawab setiap port? Tambah -p untuk nama program. Hanya root boleh lihat, jadi guna sudo.
Anda hentikan nginx. Kemudian anda jalankan curl localhost. Apa jadi?
Cuba. Hentikan nginx, tengok dengan ss -tln, kemudian hidupkan semula.
Betul atau tidak?
Kini anda boleh lihat port mana yang mendengar, dan siapa menjawabnya.
You finished this before. Practice is always welcome!
Official docs: ss(8) · Debian: /etc/services
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?