route command but it says route command not found. How can I find gateway IP address in Linux using command line option?
- Open the terminal application
ip route | grep defaultcommand to find your gateway IP in Linux. The output should be as follows:
default via 192.168.2.254 dev enp0s31f6 proto static metric 100
10.83.200.0/24 dev lxdbr0 proto kernel scope link src 10.83.200.1
192.168.2.0/24 dev enp0s31f6 proto kernel scope link src 192.168.2.25 metric 100
- The route command removed from Linux and you need to use the ip command only.
See the following tutorial for info