Skip to content

Instantly share code, notes, and snippets.

@yanaga
Created June 28, 2013 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanaga/5888804 to your computer and use it in GitHub Desktop.
Save yanaga/5888804 to your computer and use it in GitHub Desktop.
Quick configuration of WiFi on a Raspberry Pi
cat << EOF | sudo tee /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
EOF
sudo mkdir -p /etc/wpa_supplicant
cat << EOF | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MEUSSID"
psk="MINHASENHA"
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment