Bird
0
0

What will netstat -tuln | grep ':80' show if a web server is running?

medium📝 Command Output Q5 of 15
Linux CLI - Networking Commands
What will netstat -tuln | grep ':80' show if a web server is running?
AActive UDP connections on port 80
BAll established connections on port 80
CListening TCP port 80 with numeric IP
DNo output if server is down
Step-by-Step Solution
Solution:
  1. Step 1: Understand netstat -tuln flags

    -t TCP, -u UDP, -l listening, -n numeric addresses.
  2. Step 2: Filter for port 80 with grep

    Shows listening TCP port 80 if web server is running.
  3. Final Answer:

    Listening TCP port 80 with numeric IP -> Option C
  4. Quick Check:

    netstat -tuln + grep ':80' = listening TCP port 80 [OK]
Quick Trick: Use -l to show listening ports, grep for port number [OK]
Common Mistakes:
  • Expecting UDP connections on port 80
  • Confusing active with listening
  • Ignoring numeric flag effects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes