route
Show and manipulate the IP routing table (legacy, prefer ip route).
Synopsis
route [OPTION]... [add|del] [TARGET]
Examples
route -n
sudo route add -net 10.0.0.0/8 gw 192.168.1.1
sudo route del default
route
Common options
| Flag | Description |
|---|---|
| -n | Numeric output — don't resolve names |
| add | Add a route |
| del | Delete a route |
| -v | Verbose operation |
About route
The `route` command show and manipulate the IP routing table (legacy, prefer ip route). Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.
Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 4 commonly used flags shown above, though the full set of options is available in the man page (`man route`).
The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Network Commands
Other commands in the Network category