Eu estou familiarizado com a rota Adicionar comando GW padrão no Linux para adicionar um gateway padrão, mas isso não funciona no Mac OS. Eu não consigo encontrar nenhum exemplo apropriado no manual da rota. Alguém pode me ajudar o comando.
I am familiar with the route add default gw command in Linux to add a default gateway, but this doesnt work on Mac OS. I cant find any appropriate example in the route manual. Can anyone help me the command.
$ route delete default $ route add default 192.168.0.1
$ route change default -interface $INTF $ route change 192.168.0.0/16 -interface $INTF
Go to System Preference >> Network, and you can "Set Service Order" of the network interfaces and effectively change the default route order in the routing table.
If you are intent on using
route the man page for route will show you it's the same as most BSD route commands. You may need
ip6config (and man page) as well if you care about IPv6 routing.
The "mac" way is to set it from the System Preference pane under network and is preferred over using unix commands since it honors location changes and other events such as a reboot.