Connecting to Wi-Fi that requires username and password (8021x network) from the terminal
Sup,
so 2 days ago, bought a SSD to replace my HDD in my old, now main, Acer notebook, so I had to reinstall Omarchy. Everything works faster now ๐Ÿ˜ƒ.
Except I went to work the next day, but I couldn't connect to our enterprise Wi-Fi from the UI. So I looked up the problem and I saw that there is some extra setup, because of the username + password, which I'm not used to as a former Macbook user LOL. I had to get some work done, so I just connected to my hotspot, but later in the day, I had some spare time to figure this out, so this is what I've learned:
I had to use iwd (sudo pacman -S iwd; you could possibly use NetworkManager package as well) to enable the connection instead of the normal TUI my OS has.
It's quite simple once you do it once, just:
  1. Create a credentials file:
$ sudo nvim /var/lib/iwd/SSID.8021x
  • SSID is the name of the network you want to connect to
  • then paste this template and change the 'USERNAME' and 'PASSWORD'
[Security]
EAP-Method=PEAP
EAP-Identity=USERNAME
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=USERNAME
EAP-PEAP-Phase2-Password=PASSWORD
2. save, then:
$ iwctl - that opens the iwd interface
$ station wlan0 scan - scan for networks
$ station wlan0 get-networks - list found networks
$ station wlan0 connect YOUR_NETWORK
And you should be connected!
0
0 comments
Jiri Zak
1
Connecting to Wi-Fi that requires username and password (8021x network) from the terminal
powered by
Better Linux
skool.com/software-7739
Learn how to use Linux more effectively together.
Build your own community
Bring people together around your passion and get paid.
Powered by