Courseiva

LPIC-1 Essential System Services and Networking Practice Question

Which of the following commands will display the default gateway of a Linux system?

⚠ Common exam trap

Many candidates confuse `netstat -r` (which does show the routing table) with `netstat -i` (which only shows interface statistics), leading them to incorrectly select option B.

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

✓

ip route show

The `ip route show` command displays the kernel routing table, which includes the default gateway as a default route (typically `default via <gateway-IP>`). This is the standard modern tool for viewing routing information on Linux systems.

Answer analysis

Option-by-option breakdown

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

  • ✗

    arp -a

    Why it's wrong here

    arp -a lists the IPv4-to-MAC address cache for hosts on the local segment, which contains no routing information. The default gateway appears in the routing table, shown by ip route or route -n. arp suits verifying layer-2 neighbour reachability.

  • ✗

    netstat -i

    Why it's wrong here

    netstat -i reports per-interface packet and error statistics, not routing entries, so no gateway address appears. The default route lives in the kernel routing table, displayed by ip route. Interface statistics suit diagnosing dropped packets or link errors.

  • ✓

    ip route show

    Why this is correct

    The ip route show command prints the kernel routing table, whose default entry (destination 0.0.0.0/0) lists the gateway address. This directly satisfies the stem's requirement to display the default gateway, unlike ip addr, which only shows interface addressing.

  • ✗

    ifconfig

    Why it's wrong here

    ifconfig shows interface addresses, netmasks and counters but never the routing table, so the default gateway is absent. ip route or route -n lists it. ifconfig suits confirming an interface's IP configuration or bringing a link up and down.

About these practice questions

One of 402 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.