Difference between revisions of "Route (command)"

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
 
== Basic Linux commands ==
 
== Basic Linux commands ==
 
* Add default router: <code>route add default gw 192.168.1.254 eth0</code>
 
* Add default router: <code>route add default gw 192.168.1.254 eth0</code>
* <code>[[netstat -rn]]</code>
+
* <code>[[netstat]] -rn</code>
  
 
== Basic Windows commands ==
 
== Basic Windows commands ==

Revision as of 05:47, 13 February 2020

route is a Linux command and Windows used to view and manipulate the IP routing table in Linux, Unix-like and Windows.


Basic Linux commands

  • Add default router: route add default gw 192.168.1.254 eth0
  • netstat -rn

Basic Windows commands

  • route delete 10.10.10.10
  • route print


Network configuration files

  • Ubuntu (systemd): networkctl
    • /lib/systemd/network, the volatile runtime network directory /run/systemd/network
    • /etc/systemd/network


Related commands: ip route [show|xxx]

See also

Advertising: