Overview
nmtui-connect is the NetworkManager TUI component specifically designed for activating and deactivating network connections. It provides a streamlined interface for:
- Connecting to WiFi networks
- Activating Ethernet connections
- Switching between network profiles
- Viewing connection status
- Quick disconnection from networks
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
- Asterisk (*): Currently active/connected
- Signal Bars (▂▄▆█): WiFi signal strength (stronger = more bars)
- Grouped by Type: Connections organized by Ethernet, Wi-Fi, VPN, etc.
- <Hidden Network>: Option to connect to WiFi networks not broadcasting SSID
📝 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
- Launch
sudo nmtui-connect
- Use ↓ to navigate to desired WiFi network
- Press Enter to activate
- If password required, enter it in the popup dialog
- 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
- Launch
sudo nmtui-connect
- Navigate to <Hidden Network> option
- Press Enter
- Enter the SSID (network name)
- Select security type (usually WPA/WPA2)
- Enter password
- 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
- Launch
sudo nmtui-connect
- Navigate to the active connection (marked with *)
- Press Enter to deactivate
- Asterisk will disappear, indicating disconnection
Task 4: Switch Between Networks
- Launch
sudo nmtui-connect
- Find current active connection (has asterisk)
- Navigate to new desired connection
- Press Enter to activate
- 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.
Troubleshooting
Connection Fails to Activate
Possible Causes:
- Wrong Password: Verify WiFi password is correct
- DHCP Issues: Router may not be assigning IP addresses
- Hardware Problem: Network adapter may be disabled or faulty
- Configuration Error: Connection settings may be invalid
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
- Hidden Network: Use <Hidden Network> option
- Disabled Adapter: Check if WiFi is enabled in hardware/BIOS
- Driver Issues: Verify wireless drivers are loaded:
lsmod | grep wifi
- Out of Range: Move closer to access point
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
- Check signal strength - may be too weak
- Interference from other devices
- Try switching WiFi channels (configure in router)
- Update network adapter drivers
- Check for system power management settings affecting WiFi
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:
- Avoid transmitting sensitive data without VPN
- Verify network name with venue staff
- Be cautious of "evil twin" networks with similar names
- Consider using VPN for all traffic
- Disable file sharing and network discovery
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):
- Enabled: Automatically connects when available
- Priority: Higher priority connections connect first
- Metered: Mark connection as metered to reduce data usage
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
Best Practices
- Name connections descriptively: Use clear names like "Home-5GHz" instead of default names
- Set priorities: Configure auto-connect priority so preferred networks connect first
- Test before committing: Verify new connections work before removing old ones
- Keep backups: Document your connection settings before changes
- Monitor signal strength: Don't connect to networks with poor signal
- Use VPN on public WiFi: Always encrypt traffic on untrusted networks
- Disable unused connections: Prevent auto-connect for temporary networks
- Regular security audits: Remove old/unused connection profiles
✓ Success Indicators: You'll know your connection is working when:
- Asterisk (*) appears next to the connection
- You can ping external hosts:
ping -c 3 8.8.8.8
- DNS resolution works:
ping -c 3 google.com
- Web browsing functions normally