Resolve the exact Linux route, source address, and next hop to a host
Build a paste-ready command, then review its compatibility and effects before running it.
Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
LinuxVerified for Linux using bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsipip must be installed and available on PATH.
Version supportip Current supported releasesVerified for linux using bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signals8.8.8.8 via 192.168.1.1 dev eth0 src 192.168.1.42 uid 1000Representative successful output; values vary with the selected target and system state.
Known errorsip: command not foundip is missing or is not available on PATH.
Verifyip route get {{host}}The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01ipCommandRuns the ip stage of this one-liner.
02routeArgumentPasses route to ip.
03getArgumentPasses get to ip.
04<host>ParameterA value supplied in the Fill parameters section.
This advanced community-curated one-liner combines several stages. Review every option and placeholder before running it.
Example input
ip route get 8.8.8.8
Example output
8.8.8.8 via 192.168.1.1 dev eth0 src 192.168.1.42 uid 1000
cache
Illustrative output — exact values vary by system and data.
Official sources