Connect to Wifi with nmcli

First check if the Wi-Fi device is enabled or not: $ nmcli radio wifi If the output shows that the Wi-Fi is disabled, then it can be enabled with: $ nmcli radio wifi on If we already know the access point, then skip the following step. Otherwise, to identify the access points, run: $ nmcli dev wifi list Supposed we want to connect to the access point named ’totoro’, and the password is ’t0t0r02023’, we can connect to it by running the following command: ...

July 23, 2023 · 1 min · 151 words · kenno

Auto Connect to Hidden Wifi With Networkmanger

If you’re here to find out how to setup network connection to hidden wifi access point, you might want to check this post: How to Connect to Hidden Wifi Using nmcli instead. This post documents how I fix an issue of wifi connection on a laptop running Gentoo to a hidden access point. The problem is that the wifi connection doesn’t automatically connect despite I’ve set the autoconnect.connection yes. ❯ nmcli con show CamBlue | grep -i autoconnect connection.autoconnect: yes connection.autoconnect-priority: 0 connection.autoconnect-retries: -1 (default) connection.autoconnect-slaves: -1 (default) I don’t remember having done anything special on the Fedora laptops connecting to the same the network; and this problem didn’t exit on any of those Fedora machines at all. ...

December 21, 2020 · 2 min · 270 words · kenno

How to Connect to Hidden Wifi Using nmcli

Today I need to setup a wifi connection on a laptop to my home network with hidden SSID. Like so many things that I only have to do it once in a while, I couldn’t remember how to do it. So this blog post is something to remind me in the future should I need to do it agian. Here is one way to do it, thanks to this Stack Overflow question. (Alternatively, check man nmcli and man nmcli-examples which have detailed information): ...

January 15, 2019 · 1 min · 188 words · kenno

Connect to a WPA2-Enterprise Connection Using nmcli

This is like a re-post of a question from askubuntu.com. To get to that post, I usually had to google it. So, I’ll post it here so I know where to look for when I need it again. At work, we use WPA2-Enterprise for wireless connection. To create a new connection on my laptop with wlp3s0 as Wifi device, follow this step: # nmcli con add type wifi ifname wlp3s0 con-name work-wifi ssid work-ssid # nmcli con edit id work-wifi nmcli> set ipv4.method auto nmcli> set 802-1x.eap peap nmcli> set 802-1x.phase2-auth mschapv2 nmcli> set 802-1x.identity myusername nmcli> set 802-1x.password mypassword nmcli> set wifi-sec.key-mgmt wpa-eap nmcli> save nmcli> activate That’s it if you know how to do it. ...

August 27, 2018 · 1 min · 127 words · kenno