What command would you enter to list all active network interfaces?

Prepare for the LPI Linux Essentials Exam. Study with flashcards and multiple choice questions, each with hints and explanations. Get exam-ready!

To list all active network interfaces, using the command ip addr is the most effective approach. This command is part of the iproute2 package and has largely replaced the older ifconfig command in modern Linux distributions. With ip addr, you receive comprehensive details regarding each network interface, including the interface name, IP address, and status.

This command provides a more structured output compared to its predecessors, making it easier to interpret the information about your network interfaces. It is capable of displaying both IPv4 and IPv6 addresses, as well as other essential attributes, thus providing a thorough overview of the network configuration at a glance.

While ifconfig could also list active interfaces, it is considered deprecated in many distributions, and ip addr is typically preferred for its enhanced capabilities and consistency with current network management practices. Other options like netstat are more focused on network connections and routing rather than just listing interfaces, and show ip is not a standard command in Linux for network interface listing, so it wouldn't yield the desired information.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy