Which command displays network interfaces and their IP addresses?

Prepare for the Google Data Center Technician Exam. Use our interactive quiz featuring flashcards and multiple choice questions with hints and explanations. Get exam-ready today!

Multiple Choice

Which command displays network interfaces and their IP addresses?

Explanation:
When you need to see which network interfaces exist and what addresses they have, you want direct per-interface address information. The command that does this is ip addr. It lists every network interface and, for each one, shows its IPv4 and IPv6 addresses along with related details like the address prefix and interface state. It’s part of the modern iproute2 toolkit, which is the standard on contemporary Linux systems, so you get a consistent, comprehensive view of all interfaces and their addresses. The other options don’t serve this exact purpose as effectively: ip route displays routing rules and the path to reach networks, not the per-interface addresses; hostname -I shows IPs assigned to the host but doesn’t map them to specific interfaces or provide the interface details; ifconfig can show interfaces and addresses but is older and less consistently available on newer systems.

When you need to see which network interfaces exist and what addresses they have, you want direct per-interface address information. The command that does this is ip addr. It lists every network interface and, for each one, shows its IPv4 and IPv6 addresses along with related details like the address prefix and interface state. It’s part of the modern iproute2 toolkit, which is the standard on contemporary Linux systems, so you get a consistent, comprehensive view of all interfaces and their addresses.

The other options don’t serve this exact purpose as effectively: ip route displays routing rules and the path to reach networks, not the per-interface addresses; hostname -I shows IPs assigned to the host but doesn’t map them to specific interfaces or provide the interface details; ifconfig can show interfaces and addresses but is older and less consistently available on newer systems.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy