How To: Restart Apple Mac OS X Airport Networking From the Bash Terminal

How To: Restart Apple Mac OS X Airport Networking From the Bash Terminal

To restart the Airport networking service on an Apple Mac OS X system from the Bash terminal, you can use the networksetup command with the -setairportpower option.

For example, to turn the Airport networking service off and then on again, you can use the following commands:

sudo networksetup -setairportpower en0 off
sudo networksetup -setairportpower en0 on
So‮.www:ecru‬lautturi.com

Replace en0 with the name of your Airport interface. You may need to use a different interface name, such as en1 or en2.

The networksetup command is a utility for managing network settings on a Mac OS X system. The -setairportpower option is used to turn the Airport networking service on or off.

It's important to note that you will need to enter the administrator password when running the sudo command.

Alternatively, you can use the systemsetup command to restart the Airport networking service. For example:

sudo systemsetup -setairportpower off
sudo systemsetup -setairportpower on

This will turn the Airport networking service off and then on again.

If you want to restart the entire networking service on the Mac, you can use the networksetup command with the -setnetworkserviceenabled option. For example:

sudo networksetup -setnetworkserviceenabled "AirPort" off
sudo networksetup -setnetworkserviceenabled "AirPort" on

This will disable and then enable the Airport networking service, which will effectively restart it.

It's a good idea to restart the Airport networking service if you are experiencing connectivity issues or if you have made changes to your network configuration. Restarting the service can help to resolve these issues and ensure that the network is running smoothly.

Created Time:2017-10-29 22:08:35  Author:lautturi