Thunderbolt Ethernet

lpadmin
Contributor

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

1 ACCEPTED SOLUTION

roiegat
Contributor III

Try this:

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

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

View solution in original post

3 REPLIES 3

roiegat
Contributor III

Try this:

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

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

rtrouton
Release Candidate Programs Tester

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_...

roiegat
Contributor III

Try this:

!/bin/sh

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