Ubuntu: show default gateway

Here is how to display the default gateway on Ubuntu from the command line.

Ubuntu 20.04 + (without net tools)

ip route show

Ubuntu 18.04 - (with net-tools)

route
Romain Drouche

Romain Drouche

System Architect | MCSE: Core Infrastructure

An IT infrastructure expert with over 15 years of hands-on experience. Currently serving as a Systems and Network Project Manager and Information Systems Security (ISS) Lead, I leverage my expertise to ensure the reliability and security of technological environments.

GHinM▶