Wi-Fi Configuration Guide

To manage the Raspberry Pi’s network settings, use the nmtui text-based interface.

You can configure the device in two ways:

  • Client Mode: The Raspberry Pi connects to an existing Wi-Fi network (like your home router).

  • Access Point (AP) Mode: The Raspberry Pi creates its own Wi-Fi network for you to connect to.

To begin, open the Raspberry Pi web terminal or connect via SSH. Launch the configuration tool by running:

sudo nmtui

How to Configure AP Settings

Use these steps to change the name (SSID) and password of the Wi-Fi network created by the Raspberry Pi.

  1. Select Edit a connection.

    nmtui main menu

    nmtui main menu


  2. Select the access point profile and select Edit.

    By default, this profile is named clover2. If you do not see it, select Add → Wi-Fi. In the Mode field, select Access Point, and in the IPv4 CONFIGURATION section, select Shared.

    Selecting AP

    Selecting AP


  3. Enter your desired network name in the SSID field and a password (minimum eight characters) in the Password field.

    Editing AP

    Editing AP


  4. Select OK, then Back and Quit.

  5. Restart the NetworkManager to apply changes:

    sudo systemctl restart NetworkManager
    

Important

If you are currently connected to the Raspberry Pi via its Access Point, switching to Client Mode will turn off the AP and interrupt your SSH connection. Ensure you have an alternative way to access the device (such as a physical connection or another network) before making this switch.


How to Switch to Client Mode

Follow these steps to connect the Raspberry Pi to an external Wi-Fi network.

  1. Run the sudo nmtui and select Edit a connection.

  2. Select Add.

    Adding connection

    Adding connection


  3. In the New Connection window, choose Wi-Fi.

    Selecting Wi-Fi

    Selecting Wi-Fi


  4. Navigate to the Security field and select your network’s security type (e.g. WPA & WPA2 Personal).

    Selecting security type

    Selecting security type


  5. Enter your network name in the SSID field and your password in the Password field. Select OK, then Back.

    Entering credentials

    Entering credentials


  6. Select Activate a connection. Locate your new profile in the list and select Activate.

    Note

    The screenshot shows the profile Wi-Fi connection 1 as an example.

    If your new profile does not appear in the list, exit nmtui and restart the Network Manager:

    sudo systemctl restart NetworkManager
    

    Then, relaunch sudo nmtui, go to Activate a connection, and activate the profile.

    Activating client

    Activating client


Note

Once connected to a Wi-Fi network, the Raspberry Pi’s IP address may change. To reconnect via SSH, you will need to find the new IP address, which can typically be found in your router’s connected devices list.


How to Switch Back to AP Mode

To stop acting as a client and return to AP mode:

  1. Run sudo nmtui and select Activate a connection.

    Opening connection list

    Opening connection list


  2. Select your active client profile and click Deactivate.

    Deactivating client

    Deactivating client


  3. If the access point does not start automatically, select its specific profile and click Activate.

NetworkManager Profiles

All connection profiles are stored in the /etc/NetworkManager/system-connections/ directory. While you can manage these manually, it is recommended to use nmtui for all modifications.

If the wlan0 interface is managed by NetworkManager, do not attempt to configure it simultaneously using dhcpcd.conf, wpa_supplicant.conf, or a separate dnsmasq configuration file. Doing so may cause network instability.