Home / Alt manpages / nmtui-connect(1)

  • nmtui-connect(1)
  • User command
  • linux

Switch Wi-Fi or Ethernet Connections with nmtui-connect

nmtui-connect gives you a keyboard-driven menu for switching between saved Wi-Fi and Ethernet profiles when you cannot face the GUI settings panel. It only activates or deactivates connections that already exist: no editing profiles, no new profiles, no NetworkManager configuration changes, and it never shows you a Wi-Fi password.

  • Time: about ten minutes for a familiar network, longer if you need to chase down credentials or a flaky device.
  • You need: a terminal with a working text interface, NetworkManager, and an existing connection profile or a visible Wi-Fi network.
  • Privileges: most checks are unprivileged. NetworkManager may prompt for authorisation when the connection or device policy demands it.

1. Confirm the installed command

Check the binary and the package before you open the interface. These are read-only and do not need sudo:

$ command -v nmtui-connect
/usr/bin/nmtui-connect
$ dpkg-query -W -f='${Package} ${Version}\n' network-manager
network-manager 1.46.0-1ubuntu2.8
$ nmtui-connect --help
Usage:
  nmtui-connect [OPTION...]

Help Options:
  -h, --help       Show help options

This machine has NetworkManager 1.46.0, from package version 1.46.0-1ubuntu2.8. Because the command's job is interactive, --help only lists the help option itself. The manual describes the same screen as nmtui connect; the separate nmtui-connect binary is a shortcut that skips the activity-selection menu.

2. Record the state before you touch anything

Run nmcli to capture a before-and-after snapshot. It tells a failed selection apart from a disconnected cable, a disabled radio, or an access point that has simply vanished:

$ nmcli device status
DEVICE   TYPE      STATE                   CONNECTION
enp1s0   ethernet  connected               Office wired
wlp2s0   wifi      disconnected             --
lo       loopback  connected (externally)   --

Your devices and columns will differ. What matters is the device name, its state, and the active connection name. If NetworkManager itself is not running, fix that through your normal service-management process first: do not guess a profile name because the connection list looks empty.

3. Open the connection list

Launch the interface:

$ nmtui-connect
  • The list is host-specific. A profile is not the same thing as a device: one device can carry several profiles, and a profile may only work on a compatible device.
  • Read the full name before activating. Office, Office guest and Office VPN are easy to mix up at a glance.
  • Skip the menu when you know the target. The documented forms take a connection name, UUID, device name, or Wi-Fi SSID:
$ nmtui-connect "Office wired"
$ nmtui-connect wlp2s0
$ nmtui-connect "Example Wi-Fi"

Use one form at a time and quote any name with spaces in it. If the target is ambiguous or not found, drop the argument and pick from the list instead: the command will not invent a missing profile just because you named one.

4. Activate the connection

Select it and use the interface's activate control. For Wi-Fi, NetworkManager may ask for credentials or authorisation. Only type a password into the prompt you deliberately opened; never paste it into a shell command or a support transcript.

Warning

Activating a connection can interrupt the very session that launched nmtui-connect. This is especially likely when you swap Ethernet for Wi-Fi, change routes, or work over SSH. If you are remote, keep another management path open and expect the terminal to drop.

Once the interface reports success, exit back to the shell and check the result:

$ nmcli device status
DEVICE   TYPE      STATE      CONNECTION
wlp2s0   wifi      connected  Example Wi-Fi
enp1s0   ethernet  unavailable --

Your output will vary. Confirm the expected device says connected and names the expected profile. A successful activation proves NetworkManager connected, not that the network has Internet access.

5. Test the connection without changing it

Ask NetworkManager for its active connection summary:

$ nmcli connection show --active
NAME           UUID                                  TYPE      DEVICE
Example Wi-Fi  11111111-2222-3333-4444-555555555555  wifi      wlp2s0

Do not reuse that example UUID as a real value; it is illustrative. Compare the name and device against nmcli device status. For an application-level check, pick a destination and tool suited to your environment: a DNS lookup or a request to an approved internal service tells you more than assuming an active profile means unrestricted Internet.

6. Deactivate a connection to undo it

Reopen nmtui-connect, select the active connection, and choose deactivate. This stops the connection; it does not delete the saved profile. Verify from the shell:

$ nmcli device status
DEVICE   TYPE  STATE          CONNECTION
wlp2s0   wifi  disconnected   --

If you lose your route or your remote session, reconnect through the previous working profile, a local console, or your normal out-of-band access. Deactivation is the correct undo for a temporary connection; do not reach for deleting a profile as a first response to a failed activation, since deletion is a separate and more destructive change that nmtui-connect does not offer.

7. Diagnose the common failures

If the profile you expect is missing, confirm NetworkManager sees the device and that the profile exists. Listing profiles is read-only:

$ nmcli connection show
NAME              UUID                                  TYPE      DEVICE
Office wired      66666666-7777-8888-9999-000000000000  ethernet  enp1s0
Example Wi-Fi     11111111-2222-3333-4444-555555555555  wifi      --
  • A profile with -- in the device column is saved but inactive, not broken.
  • A missing Wi-Fi network means checking radio state and scan visibility: a hidden SSID, distance, a blocked radio or a security mismatch can all block activation.
  • A failed activation means recording the message and rechecking nmcli device status for a non-connected state, a different active profile, or a cancelled authorisation prompt. Do not keep retyping a password when the error points to a policy or device problem.

For anything service-disrupting, restore the last known working connection rather than experimenting with several profiles at once.

Checkpoint

Stop here if the connection works but the route, DNS or access policy is wrong. Those are profile and network problems, not reasons to delete the profile or run the whole interface as root.

Done means

  • Confirmed the versions: you checked the installed NetworkManager and nmtui-connect before touching anything.
  • Recorded the before state: device status was captured before activation.
  • Selected by full identity: you picked the connection by its complete name, UUID, device or SSID.
  • Verified with nmcli: the active device and profile match what you expected.
  • Know the undo: deactivation, not deletion, is the recovery action for a temporary connection.
  • Kept it clean: passwords stayed out of shell history and you avoided unnecessary elevated privileges.