Apple - Can I disable wifi automatically if there is an ethernet connection?

You have several solutions:

  1. https://gist.github.com/albertbori/1798d88a93175b9da00b

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

  1. https://macperformanceguide.com/blog/2014/20141118_0958-OSX_Yosemite-disable-WIFI.html

  2. The associated google search :

https://www.google.fr/search?client=safari&rls=en&q=disable+wifi+if+ethernet+osx&ie=UTF-8&oe=UTF-8&gfe_rd=cr&ei=VL_cWMj1B-zUXt3CkLAM


It hasn't been updated in a while, but ControlPlane handles this very well.