How can I automatically disable WiFi when I connect to an Ethernet network?

I would like my WiFi to automatically disconnect when I plug an Ethernet cable into my Mac. How would I go about this?


If you have somehow modified the default service ordering, you can set it again in the network tab using the gear.

This makes the Wi-Fi inactive for internet routing whenever you connect the cable. What you ask is scriptable if you know some programming, but there isn't a simple trigger to actually turn the Wi-Fi radio off at the user level of the OS.