Windows
Linux
Networking
Windows route print equivalent in Linux
Displays routes used to decide where network traffic should be sent.
Windows
→
route print
Linux equivalents
ip route show
ip route show
ip route show
Overview
What this command does
Displays routes used to decide where network traffic should be sent.
Migration tip: The route marked
default is the normal gateway. Add -6 to inspect IPv6 routes.Practical tasks
Common use cases
Show the routing table
Displays routes used to decide where network traffic should be sent.
ip route show
Show IPv4 routes
ip -6 route show
Show IPv6 routes
ip route get 1.1.1.1
Show which route reaches a destination
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
ip route show
ip -6 route show
ip route get 1.1.1.1
Walkthrough
Examples with explanations
ip route show # display the routing table
ip -6 route show # display IPv6 routes
ip route get 1.1.1.1 # trace the selected route to a destination
Reference
Common options and variations
| Command or option | Use |
|---|---|
ip route show | Show IPv4 routes |
ip -6 route show | Show IPv6 routes |
ip route get 1.1.1.1 | Show which route reaches a destination |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | ip route show |
Same command on this distribution. |
| Fedora | same command | ip route show |
Same command on this distribution. |
| Arch | same command | ip route show |
Same command on this distribution. |
Keep learning