How to add a route in Linux

To add a route in Linux, do this:

sudo route add -host 192.168.90.2/32 gw 192.168.1.7

The /32 means a single host, if you want to route an entire network, then put the proper suffix.

 

Share this article

Leave a Reply

Your email address will not be published.

Scroll to Top