To find out the default gateway or route on an Ubuntu Linux system, you can use the ip
command in a terminal. Here’s how to do it:
- Open a terminal window by pressing
Ctrl+Alt+T
. - Run the following command to display the routing table:
ip route
This command will display the routing table of your system, which includes information about the default gateway.
- Look for the line that starts with “default” in the output. This line will show the default gateway, which is the IP address of the router that your system uses to connect to other networks.
For example, the output might look like this:
default via 192.168.1.1 dev eth0 proto dhcp metric 100
This output shows that the default gateway is at IP address 192.168.1.1, and that the interface used to connect to the gateway is eth0
.
That’s it! You’ve now found out the default gateway or route on your Ubuntu Linux system.