TuxWraith
4 min readNetworking

Complete Guide to iwctl — Managing Wi-Fi on Linux the Modern Way

Share

iwctl (IWD Control Utility) is a command-line tool and interactive shell used to manage the iNet Wireless Daemon (iwd).
It’s a modern, lightweight alternative to the traditional wpa_supplicant, built by Intel for speed and simplicity.


📘 1. What Are iwd and iwctl?

  • iwd (iNet Wireless Daemon) is a wireless daemon developed by Intel to replace wpa_supplicant.
  • iwctl is its front-end tool for user interaction via D-Bus (interactive shell or direct commands).
  • Together, they allow you to:
    • Scan and connect to Wi-Fi networks
    • Manage known networks
    • Configure devices
    • Automate network connections

🧩 1.1 Advantages over wpa_supplicant

  • Lightweight and modern architecture
  • Integrates tightly with systemd and networkd
  • Easier to configure and debug
  • Automatically manages profiles and connections
  • Requires fewer dependencies

⚙️ 2. Installation and Setup

2.1 Installing IWD

Use your package manager to install iwd:

sudo pacman -S iwd           # Arch-based systems
sudo apt install iwd         # Debian/Ubuntu
sudo dnf install iwd         # Fedora

Then enable the service:

sudo systemctl enable --now iwd.service

2.2 Enabling Network Configuration

Edit (or create) the file /etc/iwd/main.conf:

[General]
EnableNetworkConfiguration = true
RoutePriorityOffset = 300

This lets iwd handle IP assignment and routing (like DHCP). Restart the service to apply changes:

sudo systemctl restart iwd

💡 3. Using iwctl

iwctl can be used in interactive mode or via direct commands.

3.1 Interactive Mode

Start the shell:

sudo iwctl

You’ll see the prompt:

[iwd]#

List available commands:

[iwd]# help

Common Commands

CommandDescription
device listShow available Wi-Fi adapters
station <DEVICE> scanScan for nearby Wi-Fi networks
station <DEVICE> get-networksList detected networks
station <DEVICE> connect <SSID>Connect to a Wi-Fi network
station <DEVICE> disconnectDisconnect from the current network
known-networks listList saved networks
known-networks <SSID> forgetForget a saved network
exitQuit iwctl

Example session:

[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect MyWiFiNetwork

3.2 Non-interactive Mode

You can also run single commands without entering the shell:

iwctl device list
iwctl station wlan0 scan
iwctl station wlan0 get-networks
iwctl station wlan0 connect "MySSID"

If the network requires a password:

iwctl --passphrase="MySecretPass" station wlan0 connect "MySSID"

🧠 4. Full Connection Workflow

Below is a step-by-step example to connect from scratch:

sudo systemctl enable --now iwd

# Start iwctl
sudo iwctl

[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect MyWiFiSSID
[iwd]# exit

Then verify the connection:

ip addr show wlan0
ping google.com

If you don’t get an IP address, check your DHCP or enable network configuration in /etc/iwd/main.conf.


🛠️ 5. Advanced Tips

5.1 Disable Auto-Connect

To stop auto-connecting to a network:

[iwd]# known-networks MyWiFi set-property AutoConnect no

Or edit the profile file /var/lib/iwd/MyWiFi.psk:

[Settings]
AutoConnect = false

5.2 Set a Static IP

Edit the same .psk profile:

[IPv4]
Address = 192.168.1.50
Netmask = 255.255.255.0
Gateway = 192.168.1.1
DNS = 8.8.8.8

Then restart the iwd service.

5.3 Combine with systemd-networkd

While iwd handles Wi-Fi connections, you can delegate IP configuration to:

  • systemd-networkd (for DHCP/static IP)
  • systemd-resolved (for DNS)
  • GUI front-ends like iwgtk (optional)

🧩 6. Troubleshooting

IssueCauseSolution
No Wi-Fi devices listedDriver not loadedLoad kernel module / install firmware
Can’t get IP addressDHCP failureEnable network configuration or use static IP
Keeps auto-connectingDefault behaviorDisable AutoConnect property
Conflicts with NetworkManagerTwo services controlling Wi-FiDisable wpa_supplicant or Wi-Fi in NetworkManager

✅ 7. Conclusion

iwctl is a fast, lightweight, and reliable way to manage Wi-Fi connections in Linux systems — especially those using systemd. It’s ideal for users who prefer simplicity over heavy GUI tools.

For further reading:


Read more

How to Compress Images on Linux (Complete Guide)
Tutorials

How to Compress Images on Linux (Complete Guide)

Tutorials

Remove Japanese Text from Multiple Folders on Linux

Tutorials

Remove Korean Text from Multiple Folders on Linux

How to Fix a Full Disk on a Linux Server (Step-by-Step Guide)
Tutorials

How to Fix a Full Disk on a Linux Server (Step-by-Step Guide)