nmtui-connect - Activate Network Connections

Purpose: Quick connection activation and switching interface

Package: NetworkManager-tui

Usage: nmtui connect or nmtui-connect

Overview

nmtui-connect is the NetworkManager TUI component specifically designed for activating and deactivating network connections. It provides a streamlined interface for:

Quick Launch:
sudo nmtui connect - Launch connection manager
sudo nmtui-connect - Alternative command
nmtui then select "Activate a connection" - Via main menu
💡 When to Use nmtui-connect: This is your go-to tool for day-to-day connection management. Use it when you need to quickly switch networks, connect to WiFi, or check connection status without editing configuration.

Interface Layout

The nmtui-connect interface shows a list of all available and configured connections:

┌─────────────────────────────────────────────────────────────┐ │ │ │ NetworkManager TUI │ │ │ │ ┌────────────────────────────────────────────────────────┐ │ │ │ Ethernet │ │ │ │ * Wired connection 1 │ │ │ │ │ │ │ │ Wi-Fi │ │ │ │ * MyHomeNetwork ▂▄▆█ │ │ │ │ CoffeeShop-Guest ▂▄▆_ │ │ │ │ Neighbor-5G ▂▄__ │ │ │ │ PublicWiFi ▂___ │ │ │ │ <Hidden Network> │ │ │ │ │ │ │ │ VPN │ │ │ │ Corporate-VPN │ │ │ │ │ │ │ └────────────────────────────────────────────────────────┘ │ │ │ │ <Back> <Activate/Deactivate> │ │ │ └─────────────────────────────────────────────────────────────┘

Understanding the Display

📝 Connection States:
● ACTIVE - Currently connected
● INACTIVE - Available but not connected
● CONNECTING - Connection in progress

Navigation & Controls

Keyboard Navigation

Key Action
Move between connections
Tab Move to buttons (Back/Activate)
Enter Activate/Deactivate selected connection
Space Activate/Deactivate selected connection
Esc Return to previous menu
Ctrl+L Refresh screen (redraw)
💡 Quick Activation: You can press Enter directly on a connection to toggle it without tabbing to the Activate button.

Common Tasks

Task 1: Connect to WiFi

  1. Launch sudo nmtui-connect
  2. Use to navigate to desired WiFi network
  3. Press Enter to activate
  4. If password required, enter it in the popup dialog
  5. Wait for connection (asterisk will appear when connected)
┌─────────────────────────────────────────────────┐ │ │ │ Password required for wireless network │ │ │ │ Network: CoffeeShop-Guest │ │ │ │ Password: ___________________________ │ │ [ ] Show password │ │ │ │ <Cancel> <OK> │ │ │ └─────────────────────────────────────────────────┘

Task 2: Connect to Hidden WiFi Network

  1. Launch sudo nmtui-connect
  2. Navigate to <Hidden Network> option
  3. Press Enter
  4. Enter the SSID (network name)
  5. Select security type (usually WPA/WPA2)
  6. Enter password
  7. Tab to <OK> and press Enter
┌─────────────────────────────────────────────────┐ │ │ │ Connect to hidden Wi-Fi network │ │ │ │ Network name (SSID): ___________________ │ │ │ │ sECURITY: <WPA & WPA2 Personal> ▼ │ │ │ │ Password: ___________________________ │ │ [ ] Show password │ │ │ │ <Cancel> <OK> │ │ │ └─────────────────────────────────────────────────┘

Task 3: Disconnect from Network

  1. Launch sudo nmtui-connect
  2. Navigate to the active connection (marked with *)
  3. Press Enter to deactivate
  4. Asterisk will disappear, indicating disconnection

Task 4: Switch Between Networks

  1. Launch sudo nmtui-connect
  2. Find current active connection (has asterisk)
  3. Navigate to new desired connection
  4. Press Enter to activate
  5. Previous connection will automatically deactivate (for WiFi)
📝 Note: When you activate a new WiFi connection, NetworkManager typically deactivates the previous WiFi connection automatically. However, multiple Ethernet connections can remain active simultaneously.

WiFi Signal Strength

Signal strength indicators help you choose the best connection:

Display Signal Strength Description
▂▄▆█ Excellent (75-100%) Strong, stable connection expected
▂▄▆_ Good (50-75%) Reliable connection
▂▄__ Fair (25-50%) Usable but may have occasional issues
▂___ Weak (0-25%) Poor connection, frequent drops likely
💡 Pro Tip: For critical work, always choose networks with at least ▂▄▆_ (Good) signal strength. Weak signals can cause timeouts and disconnections.

Connection Types

Ethernet Connections

WiFi Connections

VPN Connections

Other Connection Types

Troubleshooting

Connection Fails to Activate

Possible Causes:
Check connection status:
nmcli connection show

View detailed device info:
nmcli device show

Check system logs:
sudo journalctl -u NetworkManager -f

WiFi Network Not Visible

Check WiFi adapter status:
nmcli radio wifi

Enable WiFi if disabled:
nmcli radio wifi on

Scan for networks:
nmcli device wifi list

Connection Keeps Dropping

Can't Deactivate Connection

Force disconnect via nmcli:
sudo nmcli connection down "Connection Name"

Or restart NetworkManager:
sudo systemctl restart NetworkManager
⚠️ SSH Warning: Be extremely careful when deactivating connections over SSH. Deactivating your active SSH connection will disconnect you immediately! Always have alternative access (console, IPMI, secondary interface) available.

Security Considerations

WiFi Security Types

Security Type Security Level Usage
WPA3 Personal 🔒🔒🔒 Excellent Modern networks, strongest encryption
WPA2 Personal 🔒🔒 Good Standard for most networks
WPA Personal 🔒 Fair Legacy support only
WEP ⚠️ Broken Never use - easily cracked
None (Open) ❌ None Avoid unless absolutely necessary
⚠️ Public WiFi Warning: When connecting to public networks:

Advanced Tips

Quick Connection Scripts

For frequently used connections, create helper scripts:

Switch to home WiFi:
nmcli connection up "MyHomeNetwork"

Switch to work WiFi:
nmcli connection up "OfficeWiFi"

Enable VPN after connection:
nmcli connection up "Corporate-VPN"

Auto-Connect Configuration

Connections can be set to auto-connect (configured in nmtui-edit):

Connection Monitoring

Watch connection status in real-time:
watch -n 2 nmcli connection show --active

Monitor NetworkManager logs:
sudo journalctl -u NetworkManager -f

Check connectivity:
nmcli networking connectivity check
💡 Automation Tip: Use nmcli in scripts for automated network switching:
#!/bin/bash
# Switch to best available network
if nmcli connection up "Ethernet1" 2>/dev/null; then
  echo "Connected via Ethernet"
elif nmcli connection up "HomeWiFi" 2>/dev/null; then
  echo "Connected via WiFi"
else
  echo "No connection available"
fi

When to Use nmtui-connect vs nmcli

Use nmtui-connect when:

Use nmcli when:

Best Practices

✓ Success Indicators: You'll know your connection is working when: