Command to know your default gateway
gateway to connect devices in the home to the Internet or other WAN.
if you want to know the gateway of your computer,run below commands in terminal
$route -n
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 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
or
you can use netstat -r
$netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 eth0











Leave your response!