brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: put Ethernet above Wi-Fi in your Mac's service order

macOS
~/tips/tip-macos-network-service-order

networksetup -listnetworkserviceorder

Decides which connection your Mac tries first when Ethernet and Wi-Fi are both active.

Plug a MacBook into a dock with an Ethernet port and it can be on the cable and on Wi-Fi at the same time. macOS then tries the connection at the top of its service order first, and I’d want that to be the cable.

In System Settings, click Network, open the Action pop-up menu and choose Set Service Order. Drag the services into the order you want and click OK. The top one is tried first, the rest follow in descending order.

The Terminal version shows the order with the device names next to each service, which helps when a dock adapter has a vague name:

networksetup -listnetworkserviceorder
sudo networksetup -ordernetworkservices "USB 10/100/1000 LAN" "Wi-Fi" "Thunderbolt Bridge"

An asterisk in the list marks an inactive service. Copy the names exactly as the first command prints them, with quotes around names that contain spaces. I’d name every service in the new order, so nothing ends up in a spot you didn’t choose. The service names above are only an example; yours will differ.

Why bother? A wired connection to your router is usually faster and steadier than Wi-Fi, which you notice with big transfers to a NAS or an Unraid share. Wi-Fi stays on as the fallback, so when you unplug the MacBook it simply carries on over Wi-Fi.

The caveat is VPNs. Apple says you can’t change their position because VPN connections already take priority over the rest, so a VPN that’s connected keeps winning whatever order you set. If you want a different order at home and at the office, Apple’s answer is a separate network location for each.

Further reading: Change the order of the network services your Mac uses (Apple), networksetup man page (SS64, macOS)

More macOS tips System Settings > Accessibility > Hover Text > When using the pointer A Smart Folder in Notes collects notes by tag, checklist or date Type # in a Mac note to tag it, then filter by tag in the sidebar tmutil isexcluded ~/Projects/app/node_modules Crop an image in Preview by dragging a frame and clicking Crop All macOS tips (99) All topics

Link