LFCS Networking Practice Question
A technician needs to view the current IPv4 addresses, netmasks, and interface states for all network interfaces on a Linux server. Which command displays this information in a structured, modern format?
⚠ Common exam trap
The trap here is reaching for ifconfig out of habit, even though it is deprecated and does not show CIDR netmasks or IPv6 by default.
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 standard modern tool for displaying interface addresses, netmasks, and states. It is part of iproute2 and provides both IPv4 and IPv6 details in a structured format. The other commands either show routing tables, socket statistics, or rely on deprecated tools that do not present the requested information in the required format.
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 it's wrong here
netstat -rn displays the kernel routing table in numeric form, not interface addresses or link states. It shows destination networks, gateways, and metrics, which is useful for routing troubleshooting but does not list the IP addresses assigned to each interface. It therefore does not meet the requirement of viewing interface addressing and state.
- ✗
ss -tuln
Why it's wrong here
The ss -tuln command lists listening TCP and UDP sockets in numeric form. It is used for socket and port inspection, not for displaying interface IP addresses, netmasks, or link states. While it is a modern replacement for netstat for socket statistics, it does not provide the interface information requested in the scenario.
- ✗
ifconfig -a
Why it's wrong here
ifconfig is part of the deprecated net-tools package and may not be installed on modern distributions. While it can show addresses and interface states, it does not present netmasks in CIDR notation and lacks IPv6 detail by default. The scenario asks for a modern, structured format, which ifconfig does not provide.
- ✓
ip addr show
Why this is correct
The ip addr show command (or its shorthand ip a) displays IPv4 and IPv6 addresses, netmasks in CIDR notation, and interface operational states for all interfaces. It is part of the iproute2 suite and is the modern replacement for ifconfig. It provides exactly the structured output needed to inspect addressing and link status.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 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 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.