Professional Documents
Culture Documents
How To Use A WiFi Interface
How To Use A WiFi Interface
Contents
1. How to use a WiFi interface
1. NetworkManager
1. GNOME
2. KDE Plasma
3. WiFi can scan, but not connect using NetworkManager (Debian 9 Stretch)
3. connman
4. Command Line
1. WPS
5. wpa_supplicant
2. WPA-EAP
6. Switching Connections
7. Security consideration
8. See Also
NetworkManager
GNOME
$ su -l
# apt-get update
# apt-get install network-manager-gnome
KDE Plasma
https://wiki.debian.org/WiFi/HowToUse 2/13
3/20/2020 WiFi/HowToUse - Debian Wiki
$ su -l
# aptitude update
# aptitude install plasma-nm
https://wiki.debian.org/WiFi/HowToUse 3/13
3/20/2020 WiFi/HowToUse - Debian Wiki
If you find that your wireless network device can scan, but will not complete
connecting, try turning off MAC address randomization.
[device]
wifi.scan-rand-mac-address=no
After doing this, restart Network Manager. One way to do this is to reboot, but
there should be a less disruptive way.
nmcli dev wifi hotspot ifname wlp4s0 ssid test password "test1234"
Wicd
1. Update the list of available packages and install the DebianPkg: wicd
package:
https://wiki.debian.org/WiFi/HowToUse 4/13
3/20/2020 WiFi/HowToUse - Debian Wiki
$ su -l
# aptitude update
# aptitude install wicd
# /etc/init.d/wicd start
# exit
$ wicd-client -n
https://wiki.debian.org/WiFi/HowToUse 5/13
3/20/2020 WiFi/HowToUse - Debian Wiki
connman
$ /usr/sbin/connmanctl
connmanctl> enable wifi
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
$SSID wifi_f8d111090ed6_6d617269636f6e5f64655f6d6965726461_managed_psk
... ...
connmanctl> agent on
Agent registered
connmanctl> quit
After the configuration, connman remembers your SSID selections and reuse
them automatically. Don't worry about long HEXes - in client mode TAB auto-
completion works both for commands and data.
Command Line
https://wiki.debian.org/WiFi/HowToUse 6/13
3/20/2020 WiFi/HowToUse - Debian Wiki
# ip a
# iwconfig
# ip link set wlan0 up
$ su -l
# iwlist scan
# my wifi device
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid [ESSID]
wireless-mode [MODE]
You can now bring your interface up and down with the usual ifup and ifdown
commands. If you added auto wlan0 as in the example above, the interface
should be brought up automatically during boot up.
WPS
WPS-PBC
https://wiki.debian.org/WiFi/HowToUse 7/13
3/20/2020 WiFi/HowToUse - Debian Wiki
# iwlist scan
Then press the WPS button on your access point to start the PBC mode.
dhclient wlan0
wpa_supplicant
https://wiki.debian.org/WiFi/HowToUse 8/13
3/20/2020 WiFi/HowToUse - Debian Wiki
$ su -l
# aptitude update
# aptitude install wpasupplicant
2. Use the WPA passphrase to calculate the correct WPA PSK hash for your
SSID by altering the following example:
If you don't put the passphrase on the command line, it will be prompted for. The
above command gives the following output and pipe(write) it to
"/etc/wpa_supplicant/wpa_supplicant.conf":
network={
ssid="myssid"
#psk="my_very_secret_passphrase"
psk=ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce0151668f5f53c
}
https://wiki.debian.org/WiFi/HowToUse 9/13
3/20/2020 WiFi/HowToUse - Debian Wiki
ctrl_interface=/run/wpa_supplicant
update_config=1
you'll need to copy from "psk=" to the end of the line, to put in your
/etc/network/interfaces file.
# sensible-editor /etc/network/interfaces
2. Define appropriate stanzas for your wireless interface, along with the SSID
and PSK HASH. For example :
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid myssid
wpa-psk ccb290fd4fe6b22935cbae31449e050edd02ad44627b16ce015166
The "auto" stanza will bring your interface up at system startup. If not desired,
remove or comment this line.
3. Save the file and exit the editor.
4. Bring your interface up. This will start wpa_supplicant as a background
process.
https://wiki.debian.org/WiFi/HowToUse 10/13
3/20/2020 WiFi/HowToUse - Debian Wiki
# ifup wlan0
WPA-EAP
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Switching Connections
GNOME users should use "Menu System > Administration > Network". (n.b.
this doesn't work in etch)
Console users can
use logical interfaces, as
https://wiki.debian.org/WiFi/HowToUse 11/13
3/20/2020 WiFi/HowToUse - Debian Wiki
# ifup wlan0=wlan_home
Security consideration
1. Every member of a network can listen to other members' traffic (whether it's an
unencrypted public hot-spot, or a WEP/WPA/WPA2, or LAN). Use SSL/TLS
protocols (HTTPS, IMAPS...) or VPN to preserve your privacy.
2. WEP is so insecure that it is basically equivalent to not using any encryption at
all.
3. WPA1 is deprecated. Use WPA2 instead.
4. Make sure you use a strong pass-phrase.
See Also
CategoryNetwork | CategoryWireless
https://wiki.debian.org/WiFi/HowToUse 12/13
3/20/2020 WiFi/HowToUse - Debian Wiki
https://wiki.debian.org/WiFi/HowToUse 13/13