Which command would you use to view the default gateway address on your system?

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

To view the default gateway address on a system, the command that is most appropriate is the "route" command. This command displays the routing table, which includes the default gateway along with other network routes configured on the system. The default gateway is usually listed under the destination column with a destination of "default" or "0.0.0.0".

While other commands can provide useful networking information, they do not specifically focus on default gateway details. For instance, "ifconfig" primarily displays the configuration of network interfaces, including IP addresses set on those interfaces, but it does not show the routing table or the default gateway. The "ip a" command is used to show a detailed list of all network interfaces and their statuses; however, it does not include routing information. Lastly, "netstat -i" displays a list of network interfaces with statistics but, again, does not provide information about the default gateway.

Thus, the "route" command is the most suitable choice for retrieving the default gateway address due to its focus on the routing table.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy