What command displays the routing table in a Linux system?

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

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command that displays the routing table in a Linux system is "netstat -r." This command provides a comprehensive view of the current network routing table, showing all the routes that the Linux kernel has for forwarding packets.

When executed, "netstat -r" presents information such as the destination networks, routes, gateways, and interface associated with each route. This is particularly useful for network diagnostics and troubleshooting, allowing administrators to see how data packets are being routed to various destinations.

The other commands serve different purposes. "ifconfig" is primarily used for configuring and displaying network interface configurations, while "route -n" can also display the routing table but focuses more on the routes without resolving hostnames, making them less informative in certain contexts. The "arp" command is used to view and manipulate the address resolution protocol cache but does not provide routing table information. Hence, "netstat -r" stands out as the ideal choice for viewing the complete routing table in a Linux environment.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy