Ubuntu: Find Out Default Gateway
How do I find out default gateway IP address (default router IP assigned) for my Ubuntu Linux systems? Use the route or ip command to get default routing table for Ubuntu Linux. Open the terminal and type the following command: # route -n Sample outputs: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 Destination for 0.0.0.0 is set to 192.168.1.1 via wlan0 interface i.e. 192.168.1.1 is default gateway. If you just type the route command with the -n switch it show word default instead of 0.0.0.0: route Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 1 0 0 eth0 link-local * 255.255.0.0 U ...