Adding routes in OS X or Linux

1 minute to read

Adding a route manually can be necessary sometimes. When on Linux, I know the command by heart:

# ip addresses just for example
sudo route add -net gw

On the OS X the command is similar, but a bit different 🙂

Just as a note to myself and anyone else interested:

sudo route -n add -net

This sets up a route to the net through gateway

To see an overview of current routes use:

netstat -nr