
CHAPTER 11. USE 11.3. GLOBAL NETWORKING
11.3.4.2 Commands
Commands for WiFi are supposed to be known (
iwconfig
,
iwlist
, . . . ), as they are universal. Here
are some basic commands for you, if you are too lazy to have a look at man pages:
• List networks:
iwlist interface scan
where scan can be replaced by scanning and where interface is often wlan0,
• Connect to network with a ESSID essidname:
iwconfig interface essid essidname
As in the other methods, you are also able to bring up the interface issuing
ifup interface
and, to bring it down,
ifdown interface
where
interface
is often
wlan0
(it can be verified using
ifconfig
). If
iwconfig
and related
commands are missing (your
$PATH
being correct, or after having tried with
/sbin/iwconfig
), be
sure to install the wireless-tools package.
For WEP/WPA/PSK, you need to edit
/etc/network/interfaces
, as explained in the following
lines.
11.3.4.3 WEP
Here is an example for WEP encryption:
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid youressid
wireless_key yourwepkey
11.3.4.4 WPA
Here is an example for WPA/PSK encryption:
iface wlan0 inet dhcp
# start wpa_supplicant
wpa-conf /etc/wpa_supplicant.conf
wpa-driver hostap
If wpa_supplicant.conf does not exist in /etc, create one with
40
Kommentare zu diesen Handbüchern