How to inactivate network service by terminal on mac os x?

15,927

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
Share:
15,927

Related videos on Youtube

Ehsan
Author by

Ehsan

Updated on September 18, 2022

Comments

  • Ehsan
    Ehsan over 1 year

    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

    • MaQleod
      MaQleod about 10 years
      Will 'ifconfig <iface> down' do the trick?
  • Ehsan
    Ehsan about 10 years
    No my question is how to down or up service with command line. Your answer is work on interfaces not services. For showing your network services type this command on your terminal. (networksetup -listnetworkserviceorder)
  • Ehsan
    Ehsan about 10 years
    thanks i used your answer and search on terminal by man command and finally find my answer.
  • Shamy
    Shamy about 10 years
    Congrats :D happy for you