LFCS Networking Practice Question
Which TWO commands can be used to view the current routing table on a Linux system?
⚠ Common exam trap
Candidates often confuse `ip addr` (which shows addresses) with `ip route` (which shows routes), or assume `ifconfig` shows routing information because it displays interface details, but it never shows the routing table.
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
✓
netstat -rn
Both `netstat -rn` and `route -n` display the kernel IP routing table. The `-r` flag in netstat shows the routing table, and `-n` disables DNS resolution, showing numeric addresses. The `route -n` command directly prints the routing table without resolving hostnames, making both commands suitable for viewing the current routing table.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
netstat -rn
Why this is correct
Displays routing table.
- ✗
ifconfig -a
Why it's wrong here
Shows interfaces, not routing.
- ✗
ss -tuln
Why it's wrong here
Shows listening sockets.
- ✓
route -n
Why this is correct
Displays routing table.
- ✗
ip addr
Why it's wrong here
Shows IP addresses.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.