Challenge - 5 Problems
Network Socket Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this
ss command?You run the command
ss -tuln on a Linux system. What does this command show?Linux CLI
ss -tuln
Attempts:
2 left
💡 Hint
Look at the flags: -t (TCP), -u (UDP), -l (listening), -n (numeric).
✗ Incorrect
The ss -tuln command lists all listening TCP and UDP sockets with numeric addresses and ports. It does not show established connections or resolve hostnames.
💻 Command Output
intermediate1:30remaining
What is the output of this
netstat command?You run
netstat -an | grep ESTABLISHED. What does this command output?Linux CLI
netstat -an | grep ESTABLISHED
Attempts:
2 left
💡 Hint
The
-a flag shows all sockets, -n numeric addresses, and grep ESTABLISHED filters connections in established state.✗ Incorrect
The command lists all TCP connections that are currently established, showing numeric IP addresses and ports.
📝 Syntax
advanced1:30remaining
Which
ss command syntax correctly shows all UDP sockets including listening and non-listening?Choose the correct
ss command to list all UDP sockets, both listening and non-listening.Attempts:
2 left
💡 Hint
The
-u flag is for UDP, -a shows all sockets.✗ Incorrect
ss -u -a lists all UDP sockets including listening and non-listening. Other options either show TCP sockets or only listening sockets.
🔧 Debug
advanced2:00remaining
Why does this
netstat command fail with an error?You run
netstat -ltupn and get an error: "netstat: option requires an argument -- 'p'". What is wrong?Linux CLI
netstat -ltupn
Attempts:
2 left
💡 Hint
Check if you have permission to use
-p option.✗ Incorrect
The -p option shows process info but requires root privileges. Running as a normal user causes this error.
🚀 Application
expert1:30remaining
How many TCP connections are in the LISTEN state after running this command?
You run
How many TCP connections are in the LISTEN state?
ss -tn state LISTEN on a server. The output shows these lines:LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 100 [::]:80 [::]:*
How many TCP connections are in the LISTEN state?
Linux CLI
ss -tn state LISTEN
Attempts:
2 left
💡 Hint
Count the number of LISTEN lines in the output.
✗ Incorrect
There are two lines showing TCP sockets in LISTEN state, so the count is 2.