How to check the default gateway Linux (Ubuntu | Debian | Centos) CLI

This is a quick reference guide on how to check the default gateway on Linux Based Operating Systems.

2. ip route or ip r

[root@vps1 ~]# ip r
default via 10.0.125.254 dev ens3
10.0.125.0/24 dev ens3 proto kernel scope link src 10.0.125.11
[root@vps1 ~]# ip route
default via 10.0.125.254 dev ens3
10.0.125.0/24 dev ens3 proto kernel scope link src 10.0.125.11
[root@vps1 ~]#

Thank you for reading and please feel free to leave any feedback.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s