LFCS Networking Practice Question
A Linux administrator needs to display the IP addresses and netmasks of all network interfaces on a server. Which command provides this information in a concise, modern format?
⚠ Common exam trap
The trap here is assuming that ifconfig is still the standard tool for viewing interface addresses, or confusing interface statistics with address 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 addr show
The 'ip addr show' command is the modern, preferred tool for displaying interface IP addresses and netmasks. It is part of iproute2, which is standard on current Linux systems, and its output clearly shows each interface's addresses in CIDR notation. The other commands either show different information (netstat -i, route -n) or are deprecated and not always installed (ifconfig).
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 addr show
Why this is correct
The 'ip addr show' command from the iproute2 package displays all network interfaces with their IPv4 and IPv6 addresses, netmasks in CIDR notation, and link-layer information. It is the modern replacement for ifconfig and is available by default on virtually all current Linux distributions, providing concise and consistent output.
- ✗
netstat -i
Why it's wrong here
netstat -i displays interface statistics such as packet counts and errors, but it does not show IP addresses or netmasks. It is also part of the deprecated net-tools suite. Therefore, it does not provide the required address information in any format, modern or otherwise.
- ✗
route -n
Why it's wrong here
route -n shows the kernel routing table with destinations, gateways, and netmasks for routes, not the IP addresses assigned to interfaces. It is also from net-tools and deprecated. While useful for viewing routes, it does not list interface addresses, so it fails the scenario's requirement.
- ✗
ifconfig -a
Why it's wrong here
ifconfig is part of the legacy net-tools package and is deprecated on many modern Linux distributions. While it can show interface addresses, it is not installed by default on some systems, and its output format is less concise and consistent than the modern alternative. It does not meet the requirement for a modern command.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 406 original LFCS 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 →
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.