Linux find gateway IP address command

I type route command but it says route command not found. How can I find gateway IP address in Linux using command line option?

  1. Open the terminal application
  2. Type ip route | grep default command to find your gateway IP in Linux. The output should be as follows:
    default via dev enp0s31f6 proto static metric 100 dev lxdbr0 proto kernel scope link src dev enp0s31f6 proto kernel scope link src metric 100
  3. The route command removed from Linux and you need to use the ip command only.

See the following tutorial for info

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki