_:n9968ed77eef4498a8512507c7b42b303xb0
<http://schema.org/articleBody>
"Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with the ifconfig(8) program.\r\nWhen the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables.\r\nIn this article we will show you how to use the route command to add/delete default gateway, add/delete a route with a temporary way, it means that the changes will be lost if the system is shutdown or reboot.\r\nAdd default gateway\r\nTo add default gateway to route table use following command:\r\n# route add default gw  \r\n\r\nExample:\r\n# route add default gw 192.168.1.1\r\n\r\nDelete default gateway\r\n\r\nTo delete default gateway type following command:\r\n# route del default gw \r\n\r\nExample:\r\n# route del default gw 192.168.1.1\r\nAdd and deleting route to a host type\r\nTo add route to a host type enter following command:\r\n# route add -host  gw\r\nExample:\r\n# route add -host 192.168.1.100 gw 192.168.1.2\r\n\r\nDeleting a route to a host, type:\r\n# route del -host  gw\r\nExample:\r\n# route del -host 192.168.1.100 gw 192.168.1.2\r\nFor more information about route command ask a question in the comments."
<https://lintut.com/how-to-use-route-command-on-rhelcentos-linux/>