ip route show default on Linux: Find Default Gateway Fast

ip route show default - custom-ipdef-featured.png

GSC shows ip route show default — admins verifying internet after DHCP or template clone. Full routing guide: ip route on Linux; connectivity tests: ping & traceroute.

Proxmox/LXC: check guest gateway matches your bridge.

Show default route

ip route show default or ip r filtered.

bashshow
ip -4 route show default
ip route | grep default
default
gateway

Test path

ip route get resolves which gateway faces the internet.

bashget
ip route get 8.8.8.8
route get
8.8.8.8

Temporary fix

Add default via gateway when DHCP failed.

bashadd
sudo ip route add default via 192.168.1.1 dev eth0
add default
via

Persist

Use Netplan, nmcli, or distro network files — reboot clears raw ip route add.

WarningWrong gateway on a VM is the #1 cause of ‘ping works from host but not from guest’.
persist
netplan

Quick Reference

  • ip route show default
  • ip route get 1.1.1.1
  • Persist with Netplan/nmcli

Related tutorials

Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.