Ubuntu Linux Find Out Default Gateway / Route

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:

  1. Open a terminal window by pressing Ctrl+Alt+T.
  2. 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.

  1. 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.

Leave a Comment