mirror of
https://github.com/mayfrost/guides.git
synced 2024-10-31 23:16:06 +00:00
1.4 KiB
1.4 KiB
NETWORKING
WiFi
Use WiFi without a separate network manager with this simple guide. Needs "dhcpcd" or "dhcpclient", "net-tools" or "iproute2", "wpa_supplicant", and the WiFi drivers for your wireless card (like "iwlwifi" and its "ucode"), which in part can be installed from a package usually named "linux-firmware", but they may not be complete (this provides "ucode" but not "iwlwifi").
NOTE: The "<DEVICE_NAME>" can be either "wlp3s0" or "wlan0". Change accordingly the following commands to suit your needs.
- Create the configuration file (as "root", not "sudo"):
wpa_passphrase <NETWORK_NAME> <PASSWORD> > /etc/wpa_supplicant.conf
- Delete non hashed password from "/etc/wpa_supplicant.conf", but not the hashed one.
Each time you need to connect type the following command (as "root" or with "sudo"):
- EXAMPLE 1: With "net-tools" and "dhcpcd":
ifconfig <DEVICE_NAME> down
ifconfig <DEVICE_NAME> up
wpa_supplicant -B -i<DEVICE_NAME> -c /etc/wpa_supplicant.conf -Dwext
dhcpcd <DEVICE_NAME>
- EXAMPLE 2: With "iproute2" and "dhclient":
ip link set <DEVICE_NAME> down
ip link set <DEVICE_NAME> up
wpa_supplicant -B -i<DEVICE_NAME> -c /etc/wpa_supplicant.conf -Dwext
dhclient <DEVICE_NAME>
You can save either example in a script to activate the Wi-Fi whenever you want.
- Note: As an educational tip, the name of a network is also called "SSID" in other places.