22 Apr '12, 8pm
Ever wondered how to restart your mac's airport (wifi) from the command line?
Sometimes things happen and for reasons unknown, your airport stops working. You could go the menu bar, turn WIFI off, and then turn WIFI on again, or you could do create a shell script with these contents #!/bin/bash /usr/sbin/networksetup -setairportpower en0 off sleep 1 /usr/sbin/networksetup -setairportpower en0 on view raw restartairport.sh This Gist brought to you by GitHub . Make sure to replace en0 with en1 if you are on a Macbook Pro. Hopefully this tip will help someone searching for “restarting airport from the command line” or even “what’s the meaning of life”