Courseiva

LPIC-1 Essential System Services and Networking Practice Question

A user reports that they cannot access the company's web server. The administrator confirms the server is running and network connectivity is fine. Which command should be used to verify that the HTTP service is listening on the correct port?

⚠ Common exam trap

A common mix-up: candidates confuse general network connectivity tools (ping, iperf3) or routing commands (netstat -rn) with service-specific port listening checks, failing to recognize that only `ss` (or `netstat -tlnp`) directly confirms the HTTP daemon is bound to the correct port.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

ss -tlnp

`ss -tlnp`, is correct because it lists TCP listening sockets with their port numbers and associated processes. The `-t` flag filters for TCP, `-l` shows only listening sockets, `-n` displays numeric addresses and ports (avoiding DNS lookups), and `-p` reveals the process ID/name. This directly verifies whether the HTTP service (typically port 80 or 443) is actively listening on the expected interface.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    ping 127.0.0.1

    Why it's wrong here

    ping 127.0.0.1 tests the loopback interface and IP stack, confirming only that the local TCP/IP stack responds; it cannot reveal which ports a service is listening on. It would be the correct choice when isolating local NIC or stack faults, but verifying HTTP port binding requires inspecting listening sockets.

  • ✗

    netstat -rn

    Why it's wrong here

    netstat -rn displays the kernel routing table, listing destinations and gateways rather than listening sockets. It would be the correct choice when diagnosing routing or default gateway problems, but confirming the HTTP service is bound to the correct port requires listing sockets in listening state with their associated ports.

  • ✗

    iperf3 -c localhost

    Why it's wrong here

    iperf3 measures network throughput between two hosts and does not report listening sockets or ports. It would be the correct choice when benchmarking bandwidth or testing link performance, but verifying that HTTP is bound to the expected port requires inspecting local socket state, which iperf3 cannot show.

  • ✓

    ss -tlnp

    Why this is correct

    ss -tlnp lists listening TCP sockets with numeric ports and the owning process, directly confirming whether the HTTP service is bound to the expected port. The -l flag restricts output to listening sockets, satisfying the verification requirement.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This LPIC-1 question is part of Courseiva's 402-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.