In computing, <code>route</code> is a command used to view and manipulate the IP routing table in Unix-like and Microsoft Windows operating systems and also in IBM OS/2 and ReactOS. Manual manipulation of the routing table is characteristic of static routing.
The command originated in 4.2BSD. It is not part of any UNIX standard, but the BSD interface is widely implemented.
Linux contains a version of the originally written by Fred N. van Kempen, later merged with <code>netstat</code>'s codebase (another command originating in 4.2BSD). It implements an extended syntax compared to the BSD version. In Linux distributions based on 2.2.x Linux kernels, the <code>ifconfig</code> and <code>route</code> commands are operated together to connect a computer to a network, and to define routes between computer networks. Distributions based on later kernels have deprecated <code>ifconfig</code> and <code>route</code>, replacing them with <code>iproute2</code>.
On macOS, the <code>route</code> utility is present but largely nonfunctional. Displaying the routing table is instead performed via <code>netstat -nr</code>.
The BSD syntax is:
The Linux syntax is:
In other words, the basic <code>route add</code> and <code>route del</code> commands are portable.
The command is only available if the TCP/IP protocol is installed as a component in the properties of a network adapter.
The command-syntax is:
The <kbd>-p</kbd> parameter is only supported on Windows NT 4.0, Windows 2000, Windows Millennium Edition, and Windows XP. It is not supported on Windows 95 or Windows 98.
The command-syntax is:
ReactOS is an open-source Windows clone. The implementation will eventually cover all options supported by Windows, but the current (as of 2025) version does not. It instead implements a subset of the options, a "poor man's route":
Print the route table:
Add a route:
Delete a route: