Skip to content

Instantly share code, notes, and snippets.

@DustinD2
Created April 2, 2013 00:21
Show Gist options
  • Save DustinD2/5288937 to your computer and use it in GitHub Desktop.
Save DustinD2/5288937 to your computer and use it in GitHub Desktop.
Just some code to connect to a network via commandline on ubuntu
#!/bin/bash
# Outputs our list of networks
sudo iwlist wlan0 scan
#configure before joining
sudo iwconfig wlan0 ap 00:18:E7:D1:C2:32 #mac of router to join
sudo iwconfig wlan0 essid dlink #name of network
sudo iwconfig wlan0 freq 2.437
#connect!
sudo dhclient wlan0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment