How to Connect to Wi-Fi Using `iwd` on Arch Linux
iwd
on Arch LinuxCategories:
5 minute read
Arch Linux is renowned for its minimalist design and hands-on approach, giving users complete control over their system configuration. This philosophy extends to network management as well. While tools like NetworkManager
and wpa_supplicant
are popular choices for managing Wi-Fi connections, another lightweight and modern alternative has emerged: iwd
, short for iNet Wireless Daemon.
Developed by Intel, iwd
aims to replace the older wpa_supplicant
with a more efficient, streamlined, and faster wireless daemon. It is especially useful for systems that prefer minimal dependencies or headless environments where graphical tools are unnecessary. In this guide, we’ll explore how to install, configure, and use iwd
to connect to Wi-Fi on Arch Linux.
What is iwd
?
iwd
(iNet Wireless Daemon) is a wireless management daemon developed by Intel. It is written in C and designed to work with the Linux kernel’s nl80211
interface for managing wireless devices.
Key Features
- Minimal memory and CPU usage.
- No dependencies on
wpa_supplicant
or heavy frameworks. - Built-in support for WPA/WPA2 and WPA3.
- Command-line interface (
iwctl
) for ease of use. - Can work standalone or integrate with
systemd-networkd
orNetworkManager
.
Prerequisites
Before diving into setup, ensure your system meets the following prerequisites:
- A functioning Arch Linux installation.
- A wireless network interface card (NIC) supported by the Linux kernel.
- Internet access for package installation (initially via Ethernet or mobile tethering, if Wi-Fi isn’t configured yet).
Step 1: Install iwd
iwd
is available in the official Arch Linux repositories. To install it, run:
sudo pacman -S iwd
This will install the daemon along with the iwctl
command-line interface used for managing wireless connections.
Step 2: Enable and Start the iwd
Service
Once installed, you need to enable and start the iwd
systemd service:
sudo systemctl enable iwd.service
sudo systemctl start iwd.service
You can check the status to ensure everything is working properly:
systemctl status iwd.service
If your wireless card is supported and detected, the service should start without any issues.
Step 3: Connect to Wi-Fi Using iwctl
With iwd
running, you can now use the iwctl
utility to manage your wireless connections.
Launch iwctl
Open the iwctl
interface:
iwctl
This drops you into an interactive shell where you can enter commands directly.
Check Available Devices
To list available network devices:
[iwd]# device list
You’ll see output like:
Devices:
wlan0 - Intel Wireless-AC
Here, wlan0
is the name of your wireless device. Note this, as you’ll use it in subsequent steps.
Scan for Available Networks
To see which networks are in range:
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
This will list SSIDs and their security types (e.g., PSK, SAE, etc.).
Connect to a Network
To connect to a Wi-Fi network:
[iwd]# station wlan0 connect SSID_NAME
Replace SSID_NAME
with the actual name of your Wi-Fi network.
If the network is secured, iwctl
will prompt you for the password. If entered correctly, the system will authenticate and associate with the access point.
Automatic IP Assignment
By default, iwd
doesn’t manage IP addresses. You’ll need a DHCP client for that. If you have systemd-networkd
enabled and configured, it will automatically assign an IP. Alternatively, you can install and use dhcpcd
:
sudo pacman -S dhcpcd
sudo systemctl enable --now dhcpcd
Once connected and DHCP is handled, you’ll have full network access.
Step 4: Verify the Connection
You can confirm the status of the connection with:
[iwd]# station wlan0 show
This will display details such as the connected SSID, signal strength, frequency, and security protocol.
To exit the iwctl
shell, simply type:
[iwd]# exit
Step 5: Connect Automatically on Boot
By default, iwd
stores known networks and will attempt to reconnect automatically on boot. No need for additional configuration unless you use multiple network interfaces or advanced setups.
The configuration files are stored under:
/var/lib/iwd/
Each network has its own .psk
file (for WPA/WPA2) or .8021x
file (for enterprise networks). You can edit or remove these files to manage known networks.
Advanced Configuration
Using iwd
with systemd-networkd
If you’re managing your entire network with systemd-networkd
, iwd
integrates cleanly. Here’s a basic setup:
- Create a
.network
file forwlan0
:
sudo nano /etc/systemd/network/25-wireless.network
[Match]
Name=wlan0
[Network]
DHCP=yes
- Enable the relevant services:
sudo systemctl enable systemd-networkd
sudo systemctl enable systemd-resolved
sudo systemctl start systemd-networkd
sudo systemctl start systemd-resolved
Link resolv.conf
to systemd-resolved:
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
This setup ensures DNS and IP configuration are handled automatically after iwd
connects.
Troubleshooting Tips
Even though iwd
is generally straightforward, you may encounter issues. Here are a few troubleshooting tips:
1. No Wireless Devices Found
- Make sure your wireless card is detected with:
ip link
- Check kernel modules:
lspci -k | grep -A 3 -i network
- Some cards may require firmware from the
linux-firmware
package.
2. Can’t Connect to WPA3 Networks
- Ensure your system uses a recent kernel.
- Some older wireless cards may not support WPA3.
3. DHCP Not Working
- Make sure a DHCP client is installed (
dhcpcd
,systemd-networkd
,NetworkManager
, etc.). - If using
systemd-networkd
, verify your.network
files and their[DHCP]
sections.
Why Choose iwd
?
Here are a few reasons users prefer iwd
over other options:
Feature | iwd | wpa_supplicant |
---|---|---|
Memory usage | Low | Higher |
Performance | Fast startup, less overhead | Slower in comparison |
Modern features | WPA3, easy CLI, robust API | Varies with version |
Dependencies | Minimal | Often depends on others |
Headless usage | Excellent | Supported |
If you’re running a headless server, minimal desktop, or embedded device, iwd
is an excellent choice. For users needing full GUI support or more complex enterprise Wi-Fi configurations, NetworkManager
or connman
might be better suited.
Conclusion
iwd
is a modern, efficient alternative for managing Wi-Fi on Arch Linux. Its simplicity, speed, and reliability make it a compelling choice for minimal or headless systems. While it doesn’t yet support every edge case that wpa_supplicant
can handle, it works well for the majority of use cases.
To summarize:
- Install
iwd
and enable the service. - Use
iwctl
to scan and connect to networks. - Pair it with a DHCP client like
dhcpcd
orsystemd-networkd
. - Let
iwd
remember your connections for seamless automatic reconnects.
With a little setup, you’ll enjoy stable and secure wireless networking on your Arch Linux system using just the terminal and a few efficient tools.
If you’re interested in integrating iwd
into a more complex setup, such as with connman
, NetworkManager
, or even scripting your own network manager, there’s plenty of room for customization. That’s the Arch way: simple, flexible, and under your control.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.