RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


Which command is used to view network interfaces and their properties?

  1. ifconfig

  2. ip addr

  3. netstat

  4. ping

The correct answer is: ip addr

The command used to view network interfaces and their properties is "ip addr." This command is part of the iproute2 package, which has largely replaced the older net-tools package (which includes ifconfig) for managing network configurations in modern Linux distributions. When you execute "ip addr," it provides detailed information about all the network interfaces on the system, including their IP addresses, network masks, broadcast addresses, and more. This output is structured and includes both IPv4 and IPv6 address information, making it versatile for various network configurations. In contrast, "ifconfig" is an older command that may not be available on all newer distributions, as it is becoming deprecated. While it also shows network interfaces and their properties, it lacks the advanced functionality and comprehensive output that "ip addr" provides. The "netstat" command is primarily used for displaying network connections, routing tables, and a number of network interface statistics, rather than detailed properties of network interfaces themselves. Similarly, "ping" is used to check the reachability of a host on the network rather than to list network interfaces. Thus, "ip addr" is the best choice for viewing both network interfaces and their properties in a contemporary Linux environment.