![]() bash_profile just be sure it is on one line:Īlias airportcycle='networksetup -setairportpower airport off networksetup -setairportpower airport on' I have enough regular encounters with one particularly flakey router that I created an alias to power cycle my AirPort card, you can do this by adding the following to your. This is often enough to resolves basic wireless router connectivity issues like IP conflicts or malfunctioning DHCP requests. ![]() The AirPort wireless card seems to respond faster to the command line networksetup tool than any other method, making this an ultrafast method of power cycling the wireless interface. Networksetup -setairportpower airport off networksetup -setairportpower airport on We can also string the commands one after the other to power cycle the wireless interface on a Mac: Quickly Power Cycle Wi-Fi with Mac OS X’s networksetup Tool You won’t see any confirmation in the Terminal that the command succeeded or failed, but if you watch the AirPort menu icon you will see the bars disappear indicating the wireless interface is turned off, or reappear indicating that wireless is activated again. As before, pay attention to the device name:Īnd again, you may need to specify device en0 or en1 instead of ‘airport’, like so: Just like turning wi-fi off from the command line, you can also toggle it back on again. ![]() Turn Wi-Fi (Airport) On via Command Line in Mac OS X You can use the -getairportpower flag to check the port if you are unsure. Thus, you may need to specify the device port rather than ‘airport’, for example en1 or en0: The device name could be airport, en0, en1, etc, depending on the Mac hardware and the version of OS X. Networksetup -setairportpower airport off The network device name will determine how the proper syntax is entered. Turn Wi-Fi Off via Command Line in Mac OS X
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |