Macos – How to inactivate network service by terminal on mac os x

command linemacmacosnetworkingterminal

I google but found nothing helpful. the above link was useful when I wanted to create service of any other configuration commands on terminal but I found nothing about how to inactive a service by command line. I could do this by clicking on the button on GUI on System preferences but I need command line command to create script and just click on it to activate or activated 30 service at ones.

Mac networksetup command

Best Answer

I found the solution this command help me on terminal command line:

networksetup [-setnetworkserviceenabled networkservice on | off]

thanks to (man) command on terminal that help me to find my way.

To list available services, run:

sudo networksetup -listallnetworkservices
Related Question