Linux - How to find gateway ip address, Find gateway ip address
How to find gateway ip address
The below command will fetch the gateway ipaddress of your system./sbin/route -n | grep "^0\.0\.0\.0" | awk '{ print $2 }'
ip route list match 0.0.0.0/0 | cut -d \" \" -f 3
OUTPUT:
192.168.0.1
The above command will just fetch the gateway IP Address and will print it. Both command will print the same result. You can also use iproute2 command to fetch the gateway IP address. Sometime it will be very much necessary to find the gateway ip address of your system.
The topic on Linux - How to find gateway ip address is posted by - Math
Hope you have enjoyed, Linux - How to find gateway ip addressThanks for your time