Skip to main content
Solved

Thunderbolt Ethernet

  • September 1, 2016
  • 3 replies
  • 17 views

Forum|alt.badge.img+9

Hello,

I am trying to use a script to change my DNS settings for the Thunderbolt Ethernet. I am using this script

#!/bin/sh
networksetup -setdnsservers Thunderbolt Ethernet DNS.Address.here

When I run it though I am getting an error saying that Thunderbolt is not a recognized network service. I used the same script for Wi-Fi and it worked without any issues. Is there other wording I need to use instead of Thunderbolt?

Thanks

Best answer by roiegat

Try this:

#!/bin/sh
networksetup -setdnsservers "Thunderbolt Ethernet" DNS.Address.here

Adding the quotes should make it realize your using that device.

3 replies

roiegat
Forum|alt.badge.img+16
  • Valued Contributor
  • Answer
  • September 1, 2016

Try this:

#!/bin/sh
networksetup -setdnsservers "Thunderbolt Ethernet" DNS.Address.here

Adding the quotes should make it realize your using that device.


Forum|alt.badge.img+33
  • Hall of Fame
  • September 1, 2016

I have a script I wrote for setting DNS search domains on Ethernet interfaces, which loops through all available Ethernet interfaces and writes the DNS search domain settings to each one. It's available via the link below:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/set_dns_search_domains_on_ethernet_interfaces


roiegat
Forum|alt.badge.img+16
  • Valued Contributor
  • September 2, 2016

Try this:

!/bin/sh

networksetup -setdnsservers "Thunderbolt Ethernet" DNS.Address.here