Connect to Wi-Fi on GNU/Linux (terminal)

Date created: Dec 25 2021

Why?

Commands

Make sure you can run all these commands before you get started.

Main

sudo rfkill unblock wifi
sudo ip link set wlan0 up
sudo iw dev wlan0 scan | grep SSID
wpa_passphrase "Huynh Van Tai" "hanxinhdep" > xxx.conf
sudo wpa_supplicant -c xxx.conf -i wlan0 & disown
sudo dhcpcd wlan0

This document is licensed under the Creative Commons Zero v1.0 Universal.

Examples, recipes, and other code in this document are additionally licensed under the Unlicense.