How can I kill/launch wifi from terminal
As found here:  

Wifi can be turned on and off using  

networksetup -setairportpower en0 off


and back on using  

networksetup -setairportpower en0 on


When I use this, it says something along the lines of en0 is not wifi, turning on/off en1 instead, presumably because en0 is my ethernet connection.

EDIT: Also, this should be a comment, but I cannot yet comment, but sudo killall WiFiAgent does not appear to do anything on my computer.