
How to Connect to Wifi on Arch Linux? Arch Linux Network
Introduction If you have just installed Arch Linux, you may notice that there is no automatic graphical network setup waiting for you. That is normal because Arch follows a minimal philosophy and leaves networking choices to the user. Learning How to Connect t
Introduction
If you have just installed Arch Linux, you may notice that there is no automatic graphical network setup waiting for you. That is normal because Arch follows a minimal philosophy and leaves networking choices to the user. Learning How to Connect to Wifi on Arch Linux? is therefore one of the most important first skills after installation. This guide explains the process in a practical, step-by-step way, covering modern tools such as iwd, NetworkManager, wpa_supplicant, and netctl. Whether you are configuring a laptop, a desktop with a wireless adapter, or a virtual machine with passed-through Wi-Fi hardware, the goal is the same: identify the wireless interface, authenticate to the access point, obtain an IP address, and verify internet connectivity.
Arch Linux networking is flexible, but that flexibility can feel overwhelming at first. The best approach is to choose one tool, understand what it does, and avoid running multiple network managers at the same time. This article walks through several reliable methods, explains when to use each one, and includes troubleshooting advice for common problems such as missing firmware, blocked radios, and DHCP failures.
Table of Contents
- Introduction
- Understanding Arch Linux Networking
- Prerequisites Before Connecting
- Identifying Your Wireless Interface
- Method 1: Connect Using iwd
- Method 2: Connect Using NetworkManager
- Method 3: Connect Using wpa_supplicant
- Method 4: Connect Using netctl
- Comparing Wi-Fi Connection Methods
- Securing and Managing Connections
- Troubleshooting Common Wi-Fi Issues
- Tips and Best Practices
- Frequently Asked Questions
- Conclusion
Understanding Arch Linux Networking
Arch Linux does not install a complete desktop networking stack by default. The base system provides low-level tools such as ip, iw, and kernel networking support, while higher-level connection management is left to packages you choose. This design keeps the system clean, but it means you must understand the layers involved in wireless networking.
At the lowest level, the kernel needs a wireless driver and firmware for your adapter. Above that, a userspace tool must scan for networks, negotiate authentication, and associate with the access point. Finally, something must request an IP address, usually through DHCP, and configure DNS. Some tools handle all of these steps, while others handle only part of the process.
For example, iwd is a modern wireless daemon that can manage Wi-Fi connections and, with configuration, handle IP assignment. NetworkManager is a broader connection manager that supports Wi-Fi, Ethernet, VPNs, and desktop integration. wpa_supplicant focuses on WPA authentication and is often paired with dhcpcd or systemd-networkd. netctl uses profile files and is useful for simple, predictable setups.
Prerequisites Before Connecting
Before attempting to connect, make sure your system is installed and you can log in. You will need root privileges or sudo access. If you are still in the Arch installation environment, you may already have used iwctl or wifi-menu to connect. After installation, the same concepts apply, but you must install and enable your preferred tools in the new system.
Update your package database and install basic utilities if needed:
pacman -Syu
pacman -S iw iwd wireless_tools wpa_supplicant dhcpcd
If you plan to use NetworkManager, install it as well:
pacman -S networkmanager
Also check that your wireless adapter is not blocked by a hardware or software switch:
rfkill list
rfkill unblock wifi
If rfkill shows a hard block, use the physical switch or keyboard combination on your laptop. If it shows a soft block, the command above should remove it.
Identifying Your Wireless Interface
Wireless interfaces on Arch Linux often have names such as wlan0, wlp2s0, or wlo1. The exact name depends on your hardware and systemd’s predictable naming scheme. To list interfaces, use:
ip link show
Look for an interface with wireless capabilities or a name beginning with wl. You can also use:
iw dev
This shows wireless devices, their interface names, and supported modes. If no wireless interface appears, the issue is usually a missing driver or firmware. Check the kernel log:
dmesg | grep -i -E "wifi|wireless|firmware|wlan"
For USB adapters, lsusb can help identify the device. For internal adapters, lspci -k shows the kernel driver in use. If firmware is missing, install the appropriate package, such as linux-firmware, and reboot.
Method 1: Connect Using iwd
iwd is often recommended on Arch Linux because it is lightweight, modern, and designed specifically for wireless. It is commonly used in minimal installations and works well from the command line.
Install and Enable iwd
Install iwd if it is not already present:
pacman -S iwd
Enable and start the service:
systemctl enable --now iwd
If you want iwd to handle IP configuration, create or edit /etc/iwd/main.conf:
[General]
EnableNetworkConfiguration=true
Then restart iwd:
systemctl restart iwd
Scan and Connect with iwctl
Launch the interactive iwd client:
iwctl
Inside iwctl, list devices:
device list
Replace wlan0 with your actual interface name. Scan for networks:
station wlan0 scan
List available networks:
station wlan0 get-networks
Connect to a visible network:
station wlan0 connect "YourSSID"
You will be prompted for the password if required. For a hidden network, use:
station wlan0 connect-hidden "YourSSID"
After connecting, verify the connection:
station wlan0 show
If IP configuration is enabled, check your address:
ip addr show wlan0
Test connectivity:
ping -c 4 archlinux.org
code>
Method 2: Connect Using NetworkManager
NetworkManager is the best choice if you want a desktop-friendly experience, automatic reconnection, VPN support, and integration with GNOME, KDE, or other desktop environments. It can be managed with nmcli, nmtui, or graphical applets.
Install and Enable NetworkManager
Install the package:
pacman -S networkmanager
Enable and start the service:
systemctl enable --now NetworkManager
Avoid running NetworkManager alongside another network manager. If iwd or netctl is active, disable it first.
Connect with nmcli
List Wi-Fi devices:
nmcli device status
code>
Scan for networks:
nmcli device wifi list
code>
Connect to a network:
nmcli device wifi connect "YourSSID" password "YourPassword"
code>
NetworkManager will create a connection profile and attempt to connect automatically in the future. You can view profiles with:
nmcli connection show
code>
For a text-based interface, run:
nmtui
code>
This is especially helpful if you prefer menus over memorizing commands.
Method 3: Connect Using wpa_supplicant
wpa_supplicant is a traditional and widely supported tool. It is useful when you want explicit control over WPA authentication or when working with older systems. It does not assign IP addresses by itself, so you usually pair it with dhcpcd or systemd-networkd.
Create a Configuration File
Generate a secure configuration using wpa_passphrase:
wpa_passphrase "YourSSID" "YourPassword" > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
code>
Replace wlan0 with your interface name. This creates a hashed passphrase instead of storing the raw password in plain text.
Start wpa_supplicant and DHCP
Run wpa_supplicant in the background:
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
code>
Then request an IP address:
dhcpcd wlan0
code>
If you want this to persist across reboots, enable the relevant services. For example:
systemctl enable --now [email protected]
systemctl enable --now dhcpcd
code>
Service names can vary depending on your setup, so check the Arch Wiki or your installed unit files if needed.
Method 4: Connect Using netctl
netctl uses profile-based configuration and can be convenient for static or simple wireless setups. It is less commonly used for modern desktops but remains useful in minimal environments.
Install netctl:
pacman -S netctl dialog wpa_supplicant dhcpcd
code>
Use the interactive wireless menu:
wifi-menu
code>
This scans for networks and creates a profile under /etc/netctl/. Start the profile:
netctl start your-profile-name
code>
Enable it for boot:
netctl enable your-profile-name
code>
If the profile fails to start, check its contents. A typical wireless profile includes the interface, ESSID, key, and IP method. Avoid editing profiles while the interface is already in use by another manager.
Comparing Wi-Fi Connection Methods
Choosing the right tool depends on your environment. The following table summarizes the main options.
| Tool | Best For | Strengths | Limitations |
|---|---|---|---|
| iwd | Minimal Arch installs | Lightweight, fast, modern | Less desktop integration |
| NetworkManager | Desktops and laptops | GUI support, VPNs, autoconnect | Heavier than minimal tools |
| wpa_supplicant | Custom or legacy setups | Wide compatibility, explicit control | Needs separate DHCP tool |
| netctl | Simple profile-based setups | Predictable profiles, minimal | Less dynamic than NetworkManager |
For most users asking How to Connect to Wifi on Arch Linux?, iwd is a strong default for minimal systems, while NetworkManager is the most convenient option for desktop environments. You can use either, but not both at the same time.
Securing and Managing Connections
Wi-Fi security is not only about choosing WPA2 or WPA3. It also involves how credentials are stored and how services are configured. When possible, use WPA3 on modern routers and clients. If your hardware or router does not support WPA3, use WPA2 with a strong passphrase.
Protect configuration files that contain credentials:
chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
code>
NetworkManager stores profiles under /etc/NetworkManager/system-connections/, and these are usually readable only by root. iwd stores known networks under /var/lib/iwd/. Avoid copying credential files to insecure locations or sharing them in logs.
If you use a public network, consider using a VPN after connecting. A VPN encrypts traffic beyond the local wireless link and protects you on untrusted networks. Also disable automatic connection to open networks unless you specifically need that behavior.
Troubleshooting Common Wi-Fi Issues
When Wi-Fi does not work, approach the problem layer by layer. First confirm that the adapter exists and is not blocked. Then check the driver and firmware. Next verify authentication. Finally check IP configuration and DNS.
No Wireless Interface Appears
If ip link shows no wireless interface, the kernel may lack the driver or firmware. Install linux-firmware, reboot, and check dmesg. Some adapters require specific packages, such as firmware for Broadcom or Realtek devices. If you installed Arch without internet, you may need to use a wired connection or USB tethering temporarily.
Radio Is Blocked
Use rfkill list to identify blocks. A soft block can be removed with rfkill unblock wifi. A hard block requires a hardware switch or function key. Some laptops also expose airplane mode settings in firmware.
Authentication Fails
Double-check the SSID and password. Hidden networks require special commands in iwd and careful profile configuration in other tools. If the router uses WPA3 and your adapter or tool does not support it, try WPA2. Also ensure only one network manager is running, because competing services can repeatedly disconnect the interface.
Connected but No Internet
If you are associated with the access point but cannot browse, the problem may be DHCP or DNS. Check your IP address:
ip addr show wlan0
code>
If no IP address is assigned, restart the DHCP client or network manager. Test DNS separately:
ping -c 4 1.1.1.1
code>
If the IP ping works but domain names do not, inspect /etc/resolv.conf. NetworkManager and systemd-resolved can manage DNS, but misconfiguration may leave the file empty or stale.
Service Conflicts
Do not enable multiple managers at once. For example, if NetworkManager is running, disable iwd or netctl unless NetworkManager is explicitly configured to use iwd as its backend. Check active services:
systemctl --type=service --state=running | grep -i -E "network|wpa|iwd|dhcp"
code>
Disable conflicting services and reboot if necessary.
Tips and Best Practices
- Choose one networking tool and learn it well before experimenting with others.
- Use
ip link,iw dev, andrfkillas your first diagnostic commands. - Keep firmware updated with
linux-firmwareand regular system updates. - Use hashed passphrases where supported instead of storing raw passwords.
- Enable services with
systemctl enable --nowso they start automatically. - Test both local connectivity and internet connectivity after each change.
- Read logs with
journalctl -u iwdorjournalctl -u NetworkManagerwhen troubleshooting. - Avoid running multiple network managers simultaneously.
Frequently Asked Questions
Is iwd installed by default on Arch Linux?
No. Arch Linux provides a minimal base system, so you usually install iwd yourself. Some installation guides use it temporarily, but it is not guaranteed to be present in the installed system.
Which tool is best for beginners?
NetworkManager is often easiest for beginners because of nmtui and graphical applets. However, iwd is simpler for minimal command-line setups. The best choice depends on whether you prefer a desktop environment or a minimal system.
Can I connect to an open Wi-Fi network?
Yes. With iwd, use station wlan0 connect "OpenNetwork". With NetworkManager, use nmcli device wifi connect "OpenNetwork". Be cautious on open networks and use a VPN for sensitive traffic.
How do I connect to a hidden network?
In iwd, use station wlan0 connect-hidden "SSID". In NetworkManager, you can create a connection profile with the hidden SSID. With wpa_supplicant, include the SSID in the configuration file as usual.
Can I use iwd and NetworkManager together?
NetworkManager can use iwd as its Wi-Fi backend, but you should not run both as independent managers. Choose one primary manager to avoid conflicts.
Can I use a static IP address?
Yes. NetworkManager supports static IP profiles. With iwd and systemd-networkd, you can configure static addresses. With netctl, set IP=static and provide address details in the profile.
Conclusion
Learning How to Connect to Wifi on Arch Linux? comes down to understanding your hardware, selecting a suitable tool, and following a clear sequence: identify the interface, enable the service, authenticate, obtain an IP address, and test connectivity. iwd is an excellent modern choice for minimal installations, while NetworkManager offers the most convenience for desktop users. wpa_supplicant and netctl remain valuable for specialized or traditional setups. By avoiding service conflicts, keeping firmware current, and using secure credential storage, you can build a reliable wireless configuration on Arch Linux. Once connected, you can proceed to configure users, desktop environments, updates, and the rest of your system with confidence.