Route (command)

From wikieduonline
Jump to navigation Jump to search

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[edit]

Man page:

  • Add default router:
    • route add default gw eth0
  • Add route to an specific subnet:
    • route add -net dev eth0
  • netstat -rn
  • ip route show
  • route del
  • route del -net gw netmask dev eth0

Basic Windows commands[edit]

  • route delete
  • route delete mask XXX
  • route print


  • route add default xx.xx.xx.xx
  • route del default

Network configuration files[edit]

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

Related commands: ip route [show|xxx]


Related terms[edit]

See also[edit]