shutdown Internet Sharing automatically after Mac reboot via command

casper_hsh
New Contributor

Hi there,

Just wondering is there any way to shutdown "Internet Sharing" automatically via script or command line ?? Already tried command "sudo /usr/libexec/InternetSharing -B", it could disable some background services but it couldn't eliminate the WIFI spot created. And I also tried serval methods from GOOGLE, however they are really out of date and could not be applied to Big sur and Catalina.

1 REPLY 1

mthielemann
New Contributor
/bin/launchctl stop com.apple.NetworkSharing
/bin/launchctl disable system/com.apple.NetworkSharing
/usr/libexec/PlistBuddy -c 'Delete NAT:Enabled' /Library/Preferences/SystemConfiguration/com.apple.nat.plist