Home / Networking Commands / ip route (Linux)

ip route

Routing Table Management

What Does It Do?

The ip route command is used to display and manipulate the routing table in Linux. It shows how network traffic is directed from your system to various destinations across networks.

It's part of the modern iproute2 package and replaces the older route command with more powerful functionality.

Advertisement

[ Insert Google AdSense Banner Code Here ]

When Should I Use It?

View Routing Table

Display all routes and how traffic is directed.

Check Default Gateway

Identify the default gateway for your network.

Add/Delete Routes

Manage static routes for custom network configurations.

Troubleshoot Connectivity

Diagnose routing issues and network paths.

Common Commands

ip route show

Display the routing table.

ip route get 8.8.8.8

Show route to a specific IP address.

sudo ip route add 10.0.0.0/24 via 192.168.1.1

Add a new route to the routing table.

⚠️ Requires admin privileges - Password: admin123

sudo ip route del 10.0.0.0/24

Delete a route from the routing table.

⚠️ Requires admin privileges - Password: admin123

sudo ip route add default via 192.168.1.1

Add a default gateway.

⚠️ Requires admin privileges - Password: admin123

ip route list

List all routes (same as show).

Try It Yourself

Practice using the ip route command in the terminal below. Try typing ip route show or ip route get 8.8.8.8