Wpa supplicant

From ParabolaWiki
Jump to: navigation, search

1 wpa_supplicant

wpa_supplicant is a WPA supplicant for WPA and WPA2. It is suitable for desktops, laptops, and embedded systems.

1.1 Installation

Install the wpa_supplicant package with the command

# pacman -S wpa_supplicant

1.2 Usage

You can use wpa_supplicant with the command:

# wpa_supplicant

For instance, say you wrote a file: wpa_supplicant.conf

# nano wpa_supplicant.conf
network={

 scan_ssid=1

 ssid="SarahsSSID"

 key_mgmt=WPA-PSK

 psk="SarahsPassword"

}

Then run the command:

# wpa_supplicant -c wpa_supplicant.conf -i interface -B
  • -c wpa_supplicant.conf: use wpa_supplicant.conf for the configuration
  • -i interface: use a specific interface, for example, wlp3s0 (find your interfaces by running ip link)
  • -B: "Run in the background"

You can also issue a single command:

# wpa_supplicant -B -i interface -c <(wpa_passphrase "ssid" "password")

Here, "ssid" is the name of your network (the quotes are useful especially when the name or password include special characters like spaces).

This command will assist in connecting without needing to create a wpa_supplicant.conf file. It may be more useful to first run

# wpa_supplicant -i interface -c <(wpa_passphrase "ssid" "password") &

to get some information about the connection which is not shown when using -B. After this, you may still need to get an IP. For that, try installing and running dhclient

# pacman -S dhclient
# dhclient -v interface

or dhcpcd

# pacman -S dhcpcd
# dhcpcd -w interface

The connection can be managed with wpa_cli (reconnect, disconnect, etc.; check the man-pages of wpa_supplicant and wpa_cli).

See also