Terminal commands to Shut off Airport

Created at: 2021-05-11 04:07:23
Questioner General

I posted a related question but with no answers, I guess it was too complicated or confusing.

https://discussions.apple.com/thread/252481375



Basically, my old MacBook running OS 10.6 Crashed due to Wi-Fi activation, and reinstalling the OS won't resolve the issue because the Wi-Fi is blocking the start-up. A historic known issue with this computer.



I tried to disable the Airport via the Terminal available through the install disk. The commands I found online all showed "command not found".

networksetup -setairportpower en1 off (en0 in ethernet)

networksetup -setairportpower airport off

sudo networksetup -setnetworkserviceenabled Wi-Fi off

sudo networksetup -setnetworkserviceenabled airport off

sudo networksetup -setnetworkserviceenabled "AirPort" off

networksetup -removepreferredwirelessnetwork en1 SSID_OF_NETWORK



I am trying to find a Terminal command to disable the Airport from working using the terminal on the install process.



I assume the Terminal commands could be different when using the install disk menu that activates the Terminal?



Any ideas welcome.

Answer #1:

By: Devante Feeney Jr.

I posted a related question but with no answers, I guess it was too complicated or confusing.

https://discussions.apple.com/thread/252481375



Basically, my old MacBook running OS 10.6 Crashed due to Wi-Fi activation, and reinstalling the OS won't resolve the issue because the Wi-Fi is blocking the start-up. A historic known issue with this computer.



I tried to disable the Airport via the Terminal available through the install disk. The commands I found online all showed "command not found".

networksetup -setairportpower en1 off (en0 in ethernet)

networksetup -setairportpower airport off

sudo networksetup -setnetworkserviceenabled Wi-Fi off

sudo networksetup -setnetworkserviceenabled airport off

sudo networksetup -setnetworkserviceenabled "AirPort" off

networksetup -removepreferredwirelessnetwork en1 SSID_OF_NETWORK



I am trying to find a Terminal command to disable the Airport from working using the terminal on the install process.



I assume the Terminal commands could be different when using the install disk menu that activates the Terminal?



Any ideas welcome.

Answer #2:

By: Joana Hickle

Apple's OS X used the standard Unix bash shell since Panther and recently switched to the zsh shell in Catalina. bash is still available, along with a number of other shells, pretty much with all versions of OS X or macOS. These shells are all non-graphical and why they are accessed via the Terminal "Emulator" app. On the other hand, Finder is an example of a graphical shell.



When booting up in Recovery Mode (either from firmware or the Installation Disc,) the Terminal app will provide access to the bash shell with a slightly limited set of commands. Sorry, but I don't know what commands are not available, nor whether there is any differences between the firmware or disc versions ... but I believe, networksetup as a troubleshooting tool, would be included in both.



Regardless, the networksetup command has also pretty much stayed the same throughout and is the only command available to manipulate the onboard AirPort card. What is perplexing, at the moment, is why it is not being recognized on your Mac.

Answer #3:

By: Ms. Sonya Stiedemann

Something that came to mind is the the networksetup command to disable wireless uses a different syntax based on the device name.



In earlier versions of OS X, Apple used "airport" for the wireless device name ... then they switched to using the hardware port, like en0 or en1.



... so the command could be: networksetup -setairportpower airport off for OS X Snow Leopard ... but, you already tried both variations AND indicated that the "command not found" was the result. Again, this has me currently stumped.



If your MacBook came with installation disc(s), then it doesn't support neither Recovery, nor Internet Recovery modes (I'm assuming that it is a pre-Late 2009 model,) and your only option would be to either attempt to recover:

  1. Using the Installation Disc, or
  2. If the disc is not available or damaged, order a replacement OS X Snow Leopard disc directly from Apple.

Answer #4:

By: Noemie Yost

The networksetup command set is basically designed to manipulate the Network settings in System Preferences. I don't have any Macs running OS X Snow Leopard, so I don't know if this command set is available, nor what its equivalent are. When I get a chance, I'll create a Snow Leopard VM and see what I can find out.



Have you simply tried disabling/removing the AirPort from System Preferences?

Answer #5:

By: Benton Bergnaum

Have you simply tried disabling/removing the AirPort from System Preferences?



Even better remove the Airport Card from the Computer as it is likely to continue to cause issues into the future.

I know it is a lot harder than PC laptop but there are lots of websites giving you instructions to remove the airport card.

And yes I have a junked 2011 MacBook Pro here with faulty video and wireless cards.. I keep for parts as I still have a 2011 machine working perfectly.

Answer #6:

By: Marietta Rogahn III

Sorry, I was not able to create the VM as Parallels will only allow me to do so with OS X Snow Leopard Server, not the basic vanilla one ... so I won't be able to verify what commands could be available in this older OS.

Answer #7:

By: Elmer Cummings

Thank you for the reply LaPastenague.



Unfortunately the system preferences are not accessible as the computer has crashed and the reinstall disk startup has no access to system preferences.



I can access the Terminal from the menu of the reinstall disk but the commands I found online show "command not found".



There is also a menu item for network, but while this shows the ethernet and airport there is no option to turn off the airport. Setting this to ethernet and reinstalling again just leads to the computer hanging during start-up. The same with an ethernet cable connected to the modem - I though this would override the Airport, but doesn't.



Removal of the airport card from the computer would have been an ideal way to resolve the issue but there is no way to remove the airport card from the particular model involved - I have seen that option on the older models though and know what you mean as I have installed new airports in older Macs..



To be truthful I don't know the model number of the old MacBook as that information is not available from the install disk. While the Apple menu shows all the options are greyed out.



Any ideas would be welcome. I used this old Mac to run programs like Photoshop that won't run on System 11.2.1 on my newest computer.

Answer #8:

By: Rowena Prohaska

I appreciate your replies Tesserax and your attempt to create the VM, thank you.



As the computer crashed due to a faulty airport, all the Apple Menu is greyed out when running the reinstall system DVD, so there is no access to the System preferences.



The airport was disabled from the system preferences originally; but when the MacBook crashed the reinstall on the DVD somehow reactivates the dodgy airport which blocks the reinstalled system from starting up.



I have replaced and added airports in my older Macs many years ago, but this Mac seems to have a closed system with no access to the airport. Removing the airport would have been a good solution though.



I am wondering if there are different commands from the reinstall DVD menu for the Terminal - as the OS 10.6 Terminal commands I found on the internet to shut-off or disable the Airport don't work - as mentioned in the original post.



I know multi-formating the HD and reinstalling the system would work as this was the original solution some years ago when the airport first caused the original crash. But I was trying to avoid that last course of action.









Answer #9:

By: Candelario Ledner

Apple's OS X used the standard Unix bash shell since Panther and recently switched to the zsh shell in Catalina. bash is still available, along with a number of other shells, pretty much with all versions of OS X or macOS. These shells are all non-graphical and why they are accessed via the Terminal "Emulator" app. On the other hand, Finder is an example of a graphical shell.



When booting up in Recovery Mode (either from firmware or the Installation Disc,) the Terminal app will provide access to the bash shell with a slightly limited set of commands. Sorry, but I don't know what commands are not available, nor whether there is any differences between the firmware or disc versions ... but I believe, networksetup as a troubleshooting tool, would be included in both.



Regardless, the networksetup command has also pretty much stayed the same throughout and is the only command available to manipulate the onboard AirPort card. What is perplexing, at the moment, is why it is not being recognized on your Mac.

Answer #10:

By: Al Harvey

Thank you for the continued support Tesserax.



Yes, I did see the Network from the Instal disk menu, but it doesn't provide an option to turn off the network.



I did try to switch to the Ethernet in the dropdown menu in the Network option but then trying to restart or reinstall only ended up with the same result. I can see the Wi-Fi greyed out mark in the top right of the menu bar. But this doesn't seem to be effective in turning off Wi-Fi.



I assume I may need to format the HD then reinstall the system and software.

Answer #11:

By: Gwen Mayert

Something that came to mind is the the networksetup command to disable wireless uses a different syntax based on the device name.



In earlier versions of OS X, Apple used "airport" for the wireless device name ... then they switched to using the hardware port, like en0 or en1.



... so the command could be: networksetup -setairportpower airport off for OS X Snow Leopard ... but, you already tried both variations AND indicated that the "command not found" was the result. Again, this has me currently stumped.



If your MacBook came with installation disc(s), then it doesn't support neither Recovery, nor Internet Recovery modes (I'm assuming that it is a pre-Late 2009 model,) and your only option would be to either attempt to recover:

  1. Using the Installation Disc, or
  2. If the disc is not available or damaged, order a replacement OS X Snow Leopard disc directly from Apple.

Answer #12:

By: Kaley Kiehn IV

Thank you for the continued support Tesserax, very much appreciated.



I have been using the installation disk to see the installation menu that has the Terminal and Network options as I mentioned, that was how I entered the Terminal commands mentioned initially. Without using the Install disk there is only a persistent grey screen.



I did try two installations of the system before contacting the forum. After the installation the computer restarted, after which there was a grey screen with the Apple mark and a spinning wheel, I left this for over an hour on both reinstalls but the situation persisted. Thus, I realised the airport had been switched back on automatically during reinstall and the faulty airport was blocking the boot in some way.



Previously, when this computer initially crashed, I had multi reformatted (This took overnight) then installed the system; during which I could turn off the airport during the set-up. When I tried this time, the two reinstalls slipped the airport set-up dialogue.



So it seems the option without the correct terminal command may be a multiple formatting and a clean reinstall.



The last time I used Mac OS Extended (Journaled) to format the HD but wonder if APFS would be better, any ideas most welcome.





Answer #13:

By: Mrs. Brielle Kiehn Jr.

Memoire wrote:


The last time I used Mac OS Extended (Journaled) to format the HD but wonder if APFS would be better, any ideas most welcome.

Most likely not, as APFS is only supported in the very latest versions of macOS.



Anyway. There is not much else I can add to this discussion. If you need further assistance either someone else will chime in with some potential solutions or you can make an appointment at your local Authorized Apple Service Provider to see if they can get this figured out for you. Either way, good luck!

Answer #14:

By: Ryan Christiansen

Thank you for all the support Tesserax, very much appreciated.



I formatted the disk twice and then installed OS 10.6 from the install disk and installed the software.



It seems a long journey for me to take the step. I lost all the Premier Pro saved files and Photoshop files, but anyway, the computer is running quite fast.