Skip to content

Instantly share code, notes, and snippets.

@neklaf
Last active March 14, 2020 11:38
Show Gist options
  • Save neklaf/ce05d2159171d33488cca8b503f97bab to your computer and use it in GitHub Desktop.
Save neklaf/ce05d2159171d33488cca8b503f97bab to your computer and use it in GitHub Desktop.
Setup my static network configuration at home on macOS X

List all network services

networksetup -listallnetworkservices An asterisk (*) denotes that a network service is disabled. USB 10/100/1000 LAN USB 10/100/1000 LAN 2 USB 10/100/1000 LAN 3 USB 10/100/1000 LAN 4 USB 10/100/1000 LAN 5 Wi-Fi iPhone USB Bluetooth PAN Thunderbolt Bridge

Check which one is currently used

System Preferences > Network (check list on the left), in my case "USB 10/100/1000 LAN 2"

Setup static network configuration

networksetup -setmanual "USB 10/100/1000 LAN 2" 192.168.1.112 255.255.255.0 192.168.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment