LFCS Networking Practice Question
You need to check the default gateway on a Linux server. Which command displays the current routing table, including the default route?
⚠ Common exam trap
Watch out — candidates often confuse commands that show interface addresses or listening ports with those that show routing information.
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 correct command is 'ip route show', which displays the routing table including the default route. The other commands show interface configuration (ifconfig), interface statistics (netstat -i), or listening sockets (ss -tuln), none of which reveal the default gateway.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
ip route show
Why this is correct
The 'ip route show' command displays the kernel's routing table, including the default route (usually shown as 'default via <gateway> dev <interface>'). This is the correct and modern command to view routes. It provides all necessary information to identify the default gateway.
- ✗
ifconfig -a
Why it's wrong here
The 'ifconfig -a' command displays all network interfaces and their IP addresses, but it does not show the routing table or the default gateway. It only provides interface configuration details. Therefore, it cannot be used to find the default gateway.
- ✗
ss -tuln
Why it's wrong here
The 'ss -tuln' command lists listening TCP and UDP sockets along with their port numbers. It is used for network troubleshooting of services, not for viewing the routing table. It does not provide any information about the default gateway.
- ✗
netstat -i
Why it's wrong here
The 'netstat -i' command displays interface statistics, such as packets transmitted and received, but it does not show routing information. It is used for monitoring interface errors and traffic, not for viewing the default gateway. Thus, it is not the correct command for this task.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 406-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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.