title: Enable / disable wifi via bash scripting on Android
body: <p>I am trying to enable / disable the wifi device in my android device in a bash script. I am using the terminal emulator and the program Script Manager to execute bash scripts on the phone (which is a rooted Nexus One).
  The normal way to do this in linux would be something like</p>
  
  <pre><code>ifconfig eth0 up 
  </code></pre>
  
  <p>That gives me </p>
  
  <pre><code>"eth0: no such device"
  </code></pre>
  
  <p>Trying 
      <code>iwconfig eth0</code>
  gives the same, and</p>
  
  <pre><code>iwconfig 
  </code></pre>
  
  <p>gives a list of devices with no eth0 on it. Now if I turn on wifi (manually from the GUI) and type</p>
  
  <pre><code>iwconfig
  </code></pre>
  
  <p>it shows eth0 with a lot of info. </p>
  
  <p>My question is: How can I use the command line to turn on / off wifi? And why is eth0 disappearing from the device list when wifi is disabled?</p>
  
  <p>thanks.</p>