Add specific services to network location with terminal
networksetup uses a somehow hierarchical name system for the subcommands. location subcommands are used to manage locations itself only: you can either list, get (the current), create, delete or switch between locations.

Modifying the network services of a location is done in the networkservice "name space".

To manage the network services in one location you can either use  "blacklisting" or a "whitelisting":

If you execute networksetup -createlocation &lt;location name&gt; with populate and remove unwanted network services it's blacklisting, without populate you have to add all required network services and it's rather whitelisting.

To remove a network service in case of blacklisting use:

... -removenetworkservice &lt;networkservice&gt;


To add a network service in case of whitelisting use:

...  -createnetworkservice &lt;networkservice&gt;