-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux route Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to route on Linux, covering Arch Linux, CachyOS, and other distributions including routing table management, static routes, and network routing.
route manages routing table.
Uses:
- View routes: Show routing table
- Add routes: Add static routes
- Delete routes: Remove routes
- Network routing: Manage network routing
Note: Modern alternative is ip route.
Basic usage:
# View routing table
route -n
# -n = numeric (no hostname resolution)Kernel routes:
# Kernel routing table
route
# Shows routing tableNo resolution:
# Numeric addresses
route -n
# Faster (no DNS lookup)Interface routes:
# Routes for interface
route -n | grep eth0
# Shows routes for eth0Add static route:
# Add route
sudo route add -net 192.168.2.0/24 gw 192.168.1.1
# Adds route to networkRemove route:
# Delete route
sudo route del -net 192.168.2.0/24
# Removes routeCheck installation:
# Check route
which route
# Usually in net-tools
# Install if missing
sudo pacman -S net-toolsThis guide covered route usage, routing table management, and network routing for Arch Linux, CachyOS, and other distributions.
- ip Guide - Modern routing tool
- IP Routing - Routing guide
- Networking - Network setup
-
route Documentation:
man route
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.