010-150 · Question #28
A Linux computer has no access to the internet. Which command displays information about the network gateway for the system?
The correct answer is D. route. The route command displays and manipulates the kernel IP routing table, including the default gateway entry for the system.
Question
A Linux computer has no access to the internet. Which command displays information about the network gateway for the system?
Options
- Atraceroute
- Bifconfig
- Cgateway
- Droute
- Eipconfig
How the community answered
(26 responses)- A12% (3)
- C4% (1)
- D81% (21)
- E4% (1)
Why each option
The route command displays and manipulates the kernel IP routing table, including the default gateway entry for the system.
traceroute probes the path to a remote host by sending packets across the network; it requires internet connectivity and does not simply display local routing configuration.
ifconfig displays and configures network interface parameters such as IP address and MAC address, but does not show routing table or gateway information.
gateway is not a standard Linux command; no such utility exists in typical Linux distributions.
The route command reads the kernel routing table and displays all configured routes, including the default gateway shown as the 0.0.0.0 destination entry with the gateway IP in the Gateway column. It functions entirely from local kernel data and requires no internet access, making it the correct tool for inspecting gateway configuration offline.
ipconfig is a Windows command-line tool and does not exist in Linux; the Linux equivalent for interface info is ifconfig or ip addr.
Concept tested: Linux route command for gateway inspection
Source: https://linux.die.net/man/8/route
Topics
Community Discussion
No community discussion yet for this question.