Changing service order using Terminal

Solution 1:

You need to use networksetup to do this:

networksetup -ordernetworkservices <service1> <service2> <service3> <...>

For full details, refer to the man page (man networksetup)