Wifi

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
== Connecting to a WiFi network from the Linux command line ==
+
NetworkManager tends to get in the way... big time. Don't forget to kill him.
First of all... KILL NETWORK MANAGER
+
  
===Scan for a network===
+
==WEP==
<source lang="bash">
+
<srouce lang="bash">
iwlist wlan0 scan
+
stop network-manager
</source>
+
ifconfig wlan0 down
 
+
iwconfig wlan0 essid my_network
===Connect to the network===
+
iwconfig wlan0 key s:my_passphrase
===== WEP =====
+
<source lang="bash">
+
iwconfig wlan0 essid NETWORKNAME
+
iwconfig wlan0 key s:ASCIIKEY
+
iwconfig wlan0 key HEXKEY
+
 
iwconfig wlan0 mode managed
 
iwconfig wlan0 mode managed
 +
ifconfig wlan0 up
 +
dhclient -v wlan0
 
</source>
 
</source>
===== WPA/WPA2 =====
 
To come...
 
  
===Get an IP from DHCP===
+
Alternatively you can specify the hex value for the key:
 
<source lang="bash">
 
<source lang="bash">
ifconfig wlan0 up
+
iwconfig wlan0 key ...
dhclient wlan0
+
 
</source>
 
</source>

Revision as of 12:55, 20 March 2012

NetworkManager tends to get in the way... big time. Don't forget to kill him.

WEP

<srouce lang="bash"> stop network-manager ifconfig wlan0 down iwconfig wlan0 essid my_network iwconfig wlan0 key s:my_passphrase iwconfig wlan0 mode managed ifconfig wlan0 up dhclient -v wlan0 </source>

Alternatively you can specify the hex value for the key:

iwconfig wlan0 key ...
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox