Skip to main content

Command Palette

Search for a command to run...

Proxmox configure Wi-Fi on the server

Updated
1 min read
$ sudo apt install iw wireless-tools rfkill wpasupplicant

$ sudo iwconfig 

$ sudo iwlist wlo1 scan | grep -i essid

$ wpa_passphrase wifi_name wifi_password | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf

$ sudo wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlo1

$ ^C

$ sudo wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlo1

$ sudo iwconfig # you should now see that the wifi interface is associated with the access point you specified earlier

$ sudo dhclient wlo1

$ ip address show wlo1

$ sudo dhclient wlo1 -r # to release the ip you got

$ sudo cp /lib/systemd/system/wpa_supplicant.service /etc/systemd/system/

$ sudo nano /etc/systemd/system/wpa_supplicant.service
# change the exec start to /sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlo1
# Add Restart=always under the servie block

$ sudo systemctl daemon-reload wpa_supplicant.service; sudo systemctl restart wpa_supplicant.service

$ sudo nano /etc/systemd/system/dhclient.service
[Unit]
Description= DHCP Client
Before=network.target
After=wpa_supplicant.service

[Service]
Type=forking
ExecStart=/sbin/dhclient wlo1 -v
ExecStop=/sbin/dhclient wlo1 -r
Restart=always

[Install]
WantedBy=multi-user.target


$ sudo sytemctl enable dhclient.service

$ sudo reboot

Resources:

  • https://www.linuxbabe.com/debian/connect-to-wi-fi-from-terminal-on-debian-wpa-supplicant

More from this blog

Mensah David Assigbi's personal IT blog

28 posts