Skip to content
Search

Iwd

lastmod 2026-01-22created 2020-06-2812 edits

Configuration

File /etc/iwd/main.conf can be used for main configuration. See iwd.config(5).

  • By default, iwd stores network configuration in the /var/lib/iwd directory.
  • The configuration file name is network.type.
    • network is the network SSID.
    • type is the network type (e.g., open, wep, psk, 8021x).
  • This file is used to store the encrypted PreSharedKey and, optionally, the plain-text password.
  • Users can write it themselves without invoking iwctl.
  • This file can also be used for other configuration related to that network SSID.
  • For detailed settings, see iwd.network(5).

Minimal Example

With WPA2/PSK security, if the network SSID is spaceship and the password is test1234:

Create the file /var/lib/iwd/spaceship.psk and fill it in as follows.

[Security]
PreSharedKey=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295

The PreSharedKey value can be computed using wpa_passphrase (wpa_supplicant) or wpa-psk.

$ wpa_passphrase spaceship test1234

The output looks like the following. Copy the value of the psk key.

network={
        ssid="spaceship"
        #psk="test1234"
        psk=aafb192ce2da24d8c7805c956136f45dd612103f086034c402ed266355297295
}

iwd.config

File /etc/iwd/main.conf can be used for main configuration.

Enable built-in network configuration

Since version 0.19, iwd can assign IP addresses and set up routes using its built-in DHCP client or a static configuration. This is a good alternative to a standalone DHCP client.

To enable iwd's network configuration feature, create/edit /etc/iwd/main.conf and add the following.

[General]
EnableNetworkConfiguration=true

Select DNS manager

Currently iwd supports two DNS managers: systemd-resolved and resolvconf.

To use systemd-resolved, add the following to /etc/iwd/main.conf.

[Network]
NameResolvingService=systemd

If you use resolvconf,

[Network]
NameResolvingService=resolvconf

Note that the default is systemd.

iwd.network

By default, iwd stores network configuration in the /var/lib/iwd directory.

Hidden network

For a hidden network, add the following setting.

[Settings]
Hidden=true

Auto-connect

Connects to the network automatically. This value defaults to true.

[Settings]
AutoConnect=true

Example

You need to start the service.

$ systemctl start iwd.service

If you need to register the service:

$ systemctl enable iwd.service

Then run the interactive prompt.

$ iwctl
  • Note that if you run it while the daemon is not running, it waits until the daemon starts.

You can get help with the help command.

[iwd]# help

Check the device list.

[iwd]# device list
  • You can connect using the device name found above.

You can scan for networks.

[iwd]# station <device-name> scan

You can check the list of active networks.

[iwd]# station <device-name> get-networks

Finally, connect to the network. (Use the SSID found above)

[iwd]# station <device-name> connect <ssid>

If you want to connect to a hidden network, run the following.

[iwd]# station <device-name> connect-hidden <ssid>

You can check the connection status as follows.

[iwd]# station <device-name> show

Then exit.

[iwd]# quit

See also

Favorite site

author Zer0 sitemap