Goal: Examine wireless in system: device, driver, and interface.
First thing to do in my post setup
in my vanilla Arch install is NetworkManager.
NetworkManager is the common network manager in most linux distribution.
Backend Consideration
WPA Supplicant
Before 2020, the only backend for NetworkManager is wpa_supplicant.
I’m still using this backend.
INet Wireless Daemon
The fact that arch linux setup has iwd,
does not mean that you should use iwd along with nmcli.
You can use it, but this require additional settings.
Required Service
As an overview,
in order to connect to the internet,
we required these services.
Do not forget to enable all.
You should be familiar with these command,
just in case you need to troubleshoot your network.
Controlling The Service
How does it looks like, managing the NetworkManager service.
Enable and Disable
Enabling service is just making a symbolic link.
And so, disabling service is just removing a symbolic link.
You may use su to get into root, or using sudo,
so the command line won’t ask you about which privilege to use.
Note that enable service,
does not start the service.
Status
Consider go deep into status as well.
Inactive service would looks like below output.
You should start the NetworkManager to activate the service.
So the output would looks like below:
Start and Stop
You can play with start and stop.
Nothing complex.
DHCP Service
If you have trouble connecting on the first time,
you might also require dhcpcd temporarily.
Alternatively you can use dhclient, instead of dhcpcd.
IP Leasing
NetworkManager can connect to an SSID,
but you still require DHCP client daemon to obtain an IP lease.
Without DHCPCD, the ping might failed as below:
Enable and Disable
We should enable the service,
so we can have this service automatically started at boot.
And you can try the opposite command.
Status
Active service would looks like below output.
Start and Stop
You can also play with start and stop.
NMTUI
Beginner should start with nm-applet.
The problem is, nm-applet reqquire GUI.
Most vanilla arch post-setup comes with no GUI.
So we need other cool tool.
Terminal user would love the easy to use nmtui.
First it show the main menu.
With edit dialog.
we can edit an already made connection.
Or make a new one. Or forget a connection by deleting it.
Normally you would go straight to connect to a network,
by choosing SSID name.
This can be done in activate dialog.
While choosing SSID,
there will be notification,
showing that nmtui is trying to connect to your chosen SSID.
After choosing a connection,
you would see star to the connected SSID.
That is all.
Testing The Connection
If all done well, we can test the connection.
NM CLI
Sometimes it helps to also know, the command line.
Not just for curious people,
but sometimes for troubleshooting.
The low level connection is provided by nmcli.
Let’s start by this example.
This means, you need to start NetworkManager.service by systemctl.
Let’s try again.
This means, you need to start wpa_supplicant.service by systemctl.
Let’s try again.
For first time user connection,
you need to provide password.
GUI
When you are working with desktop environment or window manager,
this is a must have tools.
iwd backend
iwgtk
iwd applet
Conclusion
I should know what’s inside my notebook.
So I can be ready for Gentoo.
We will continue to NetworkManager