nmtui - NetworkManager Text User Interface
Quick Launch: nmtui
Purpose: Interactive text-based menu for managing NetworkManager connections
Best For: Users who prefer menu-driven interfaces over command-line flags
1. Introduction to nmtui
1.1 What is nmtui?
nmtui (NetworkManager Text User Interface) is a curses-based terminal interface for NetworkManager. It provides a user-friendly, menu-driven alternative to the command-line nmcli tool, making network configuration accessible without memorizing commands or flags.
1.2 When to Use nmtui vs nmcli
Use nmtui when:
You prefer interactive menus
Setting up a new connection
Making one-time configuration changes
You're unfamiliar with nmcli syntax
Visual feedback is helpful
Working on a single machine interactively
Use nmcli when:
Scripting or automation needed
Remote administration via SSH
Batch operations on multiple connections
Integrating with other tools
Precise control over all parameters
Quick status checks
1.3 Installation and Requirements
# Usually pre-installed on systems with NetworkManager
# If not installed:
# Debian/Ubuntu
sudo apt-get install network-manager
# RHEL/CentOS/Fedora
sudo yum install NetworkManager-tui
# or
sudo dnf install NetworkManager-tui
# Arch Linux
sudo pacman -S networkmanager
# Verify installation
which nmtui
nmtui --version
2. Launching nmtui
2.1 Basic Launch
# Launch main menu
nmtui
# Direct access to specific functions
nmtui edit # Go directly to Edit a connection
nmtui connect # Go directly to Activate a connection
nmtui hostname # Go directly to Set system hostname
2.2 Navigation Basics
Key
Action
↑ ↓
Navigate up/down through menu items
Tab
Move between fields and buttons
Shift+Tab
Move backwards between fields
Enter
Select/activate item or button
Space
Toggle checkboxes
Esc
Go back/cancel
F10 or Esc
Exit nmtui
3. Main Menu Overview
nmtui Main Menu
┌───────────────────────────────────────┐
│ │
│ Edit a connection │
│ Activate a connection │
│ Set system hostname │
│ │
│ <Quit> │
│ │
└───────────────────────────────────────┘
3.1 Main Menu Options
Option
Purpose
Equivalent nmcli
Edit a connection
Create, modify, or delete network connections
nmcli connection edit
Activate a connection
Enable or disable network connections
nmcli connection up/down
Set system hostname
Change the system's hostname
nmcli general hostname
4. Editing Connections
4.1 Connection List Screen
┌─────────────────────────────────────────────┐
│ Connection: Wired connection 1 │
│ Home WiFi │
│ Office VPN │
│ │
│ <Add> <Edit...> <Delete> <Back> │
└─────────────────────────────────────────────┘
4.2 Adding a New Connection
Step-by-Step: Create New Ethernet Connection
Launch nmtui: nmtui
Select "Edit a connection" → Enter
Navigate to <Add> button → Enter
Select connection type (Ethernet, Wi-Fi, etc.) → Enter
Fill in connection details (see sections below)
Navigate to <OK> → Enter
Select <Back> to return to main menu
4.3 Connection Types
Type
Use Case
Common Settings
Ethernet
Wired network connections
IP address, gateway, DNS
Wi-Fi
Wireless network connections
SSID, security type, password
Bond
Link aggregation (multiple interfaces)
Bonding mode, slave interfaces
Bridge
Network bridging (VMs, containers)
Bridge interfaces
VLAN
Virtual LAN tagging
Parent interface, VLAN ID
VPN
Virtual Private Networks
VPN type, server, credentials
4.4 Ethernet Connection Configuration
┌────────────────────────────────────────────┐
│ Profile name: My-Ethernet_____________ │
│ Device: eth0___________________________ │
│ │
│ ═ ETHERNET │
│ Cloned MAC address: __________________ │
│ MTU: __________ │
│ │
│ ═ IPv4 CONFIGURATION <Automatic> ▼ │
│ Addresses: 192.168.1.100/24________ │
│ Gateway: 192.168.1.1_______________ │
│ DNS servers: 8.8.8.8_______________ │
│ Search domains: ___________________ │
│ │
│ ☐ Require IPv4 addressing │
│ │
│ ═ IPv6 CONFIGURATION <Automatic> ▼ │
│ │
│ ☑ Automatically connect │
│ ☐ Available to all users │
│ │
│ <Cancel> <OK> │
└────────────────────────────────────────────┘
Key Fields Explained
Field
Description
Example
Profile name
Descriptive name for the connection
Office-Ethernet, Home-Static
Device
Network interface to use
eth0, enp0s3, wlan0
Cloned MAC address
Override hardware MAC address (optional)
00:11:22:33:44:55
MTU
Maximum Transmission Unit (optional)
1500 (default), 9000 (jumbo)
4.5 IPv4 Configuration Modes
IPv4 CONFIGURATION <Manual> ▼
├ Disabled
├ Automatic (DHCP)
├ Manual (Static IP)
├ Link-Local
└ Shared
Mode
Description
When to Use
Disabled
No IPv4 addressing
IPv6-only networks
Automatic
DHCP client - obtain IP automatically
Most home/office networks
Manual
Static IP configuration
Servers, network equipment
Link-Local
169.254.x.x addressing
Direct device-to-device connection
Shared
Share connection with other devices
Internet connection sharing
4.6 Configuring Static IP Address
Setting Up Static IP
Navigate to "IPv4 CONFIGURATION" dropdown
Press Enter to open dropdown
Select "Manual" → Enter
Tab to "Addresses" field
Enter: 192.168.1.100/24
Tab to "Gateway" field
Enter: 192.168.1.1
Tab to "DNS servers" field
Enter: 8.8.8.8 (press Enter for additional servers)
Tab to <OK> → Enter
Pro Tip: You can add multiple addresses, DNS servers, and search domains by pressing Enter after each entry to add another field.
4.7 WiFi Connection Configuration
┌────────────────────────────────────────────┐
│ Profile name: Home-WiFi________________ │
│ Device: wlan0__________________________ │
│ │
│ ═ WI-FI │
│ SSID: MyNetwork__________________ │
│ Mode: <Client> ▼ │
│ BSSID: __________________________ │
│ │
│ ═ WI-FI SECURITY │
│ Security: <WPA & WPA2 Personal> ▼ │
│ Password: ************************ │
│ ☐ Show password │
│ │
│ ═ IPv4 CONFIGURATION <Automatic> ▼ │
│ │
│ ☑ Automatically connect │
│ │
│ <Cancel> <OK> │
└────────────────────────────────────────────┘
WiFi Security Types
Security Type
Description
Use Case
None
Open network, no password
Public hotspots
WEP 40/128-bit
Legacy encryption (weak)
Old equipment only
WPA & WPA2 Personal
Password-based (PSK)
Most home networks
WPA & WPA2 Enterprise
RADIUS authentication
Corporate networks
WPA3 Personal
Latest encryption standard
Modern networks
4.8 Additional Connection Options
Checkboxes at Bottom of Edit Screen
Option
Effect
Recommendation
Automatically connect
Connect at boot/when available
Enable for primary connections
Available to all users
System-wide vs user-specific
Enable for shared systems
Require IPv4 addressing
Don't connect without IPv4
Enable for IPv4-only services
Require IPv6 addressing
Don't connect without IPv6
Enable for IPv6-only services
4.9 Editing Existing Connections
Modify an Existing Connection
nmtui → "Edit a connection"
Select the connection to edit
Navigate to <Edit...> → Enter
Make desired changes
<OK> to save
Connection will be reloaded automatically
Note: Changes take effect immediately if the connection is active. You may need to disconnect and reconnect for all changes to apply.
4.10 Deleting Connections
Remove a Connection
nmtui → "Edit a connection"
Select the connection to delete
Navigate to <Delete> → Enter
Confirm deletion
Warning: Deleting a connection is permanent. The connection profile will be removed from /etc/NetworkManager/system-connections/.
5. Activating Connections
5.1 Activate a Connection Screen
┌────────────────────────────────────────────┐
│ Ethernet │
│ ● Wired connection 1 │
│ Office-Static │
│ │
│ Wi-Fi │
│ ● Home-WiFi │
│ CoffeeShop-Guest │
│ OfficeNetwork │
│ │
│ VPN │
│ Corporate-VPN │
│ │
│ <Back> │
└────────────────────────────────────────────┘
● = Active connection
5.2 Activating/Deactivating Connections
Enable a Connection
nmtui → "Activate a connection" or nmtui connect
Navigate to desired connection
Press Enter to activate
Active connections show ● (bullet point)
Press Enter again to deactivate
Quick Tip: For WiFi networks, nmtui will scan and show available networks. Select one and enter the password when prompted.
5.3 Connection Status Indicators
Indicator
Meaning
● Network Name
Connection is active
Network Name
Connection is inactive
Italicized
Connection is available but not configured
6. Setting System Hostname
6.1 Hostname Configuration Screen
┌────────────────────────────────────────────┐
│ Set system hostname │
│ │
│ Hostname: myserver____________________ │
│ │
│ │
│ <Cancel> <OK> │
└────────────────────────────────────────────┘
6.2 Changing Hostname
Update System Hostname
nmtui → "Set system hostname" or nmtui hostname
Clear existing hostname
Type new hostname
Navigate to <OK> → Enter
Changes apply immediately
Hostname Rules:
Only letters, numbers, hyphens
Cannot start or end with hyphen
Maximum 63 characters
Case-insensitive (lowercase preferred)
Example: web-server-01
6.3 Verifying Hostname Change
# Check current hostname
hostname
# Check all hostname info
hostnamectl status
# Alternative check
cat /etc/hostname
7. Common Configuration Scenarios
7.1 Scenario: Home DHCP Connection
Goal: Connect to home router via DHCP
nmtui → Edit a connection → Add
Select "Ethernet"
Profile name: Home-DHCP
Device: eth0
IPv4 CONFIGURATION: Automatic
Check "Automatically connect"
OK → Back
Activate a connection → Select "Home-DHCP" → Enter
7.2 Scenario: Static IP Server
Goal: Configure web server with static IP
nmtui → Edit a connection → Add → Ethernet
Profile name: WebServer-Static
Device: eth0
IPv4 CONFIGURATION: Manual
Addresses: 192.168.1.50/24
Gateway: 192.168.1.1
DNS servers: 8.8.8.8, 8.8.4.4
Check "Automatically connect"
Check "Available to all users"
OK → Back → Activate connection
7.3 Scenario: WiFi with Hidden SSID
Goal: Connect to hidden wireless network
nmtui → Edit a connection → Add → Wi-Fi
Profile name: Hidden-Network
SSID: MyHiddenSSID
Mode: Client
Security: WPA & WPA2 Personal
Password: your-password
Check "Automatically connect"
OK → Back → Activate connection
Hidden Network Tip: You must manually type the SSID exactly as configured on the access point.
7.4 Scenario: Secondary IP Address
Goal: Add multiple IPs to one interface
nmtui → Edit a connection → Select connection → Edit
Navigate to IPv4 Addresses field
Enter first IP: 192.168.1.100/24
Press Enter to add another field
Enter second IP: 192.168.1.101/24
Continue for additional IPs
OK → Back → Reactivate connection
7.5 Scenario: Connection Priority
Note: nmtui doesn't directly show connection priority. The system automatically prefers:
Wired over wireless
Connections activated more recently
Connections with lower metric values
For fine-grained priority control, use:
nmcli connection modify "Name" connection.autoconnect-priority 10
8. Troubleshooting in nmtui
8.1 Connection Won't Activate
Symptom
Check in nmtui
Solution
No response when activating
Verify device exists in Edit screen
Check physical connection, driver
Activates then immediately deactivates
Review IP configuration settings
Check for IP conflicts, wrong gateway
WiFi not connecting
Verify SSID and password spelling
Re-enter credentials carefully
Multiple connections fighting
Check how many are set to auto-connect
Disable auto-connect on less important ones
8.2 Can't See Network Device
Diagnostic Steps:
Exit nmtui
Check if device exists: ip link show
Check NetworkManager status: systemctl status NetworkManager
Check if device is managed: nmcli device status
If showing "unmanaged", check /etc/NetworkManager/NetworkManager.conf
8.3 Changes Not Saving
Issue
Cause
Fix
Edits disappear after OK
Permission problem
Run nmtui with sudo
Connection file missing
Disk full or read-only
Check df -h, remount rw
Settings revert
Another tool managing connection
Disable conflicting network managers
8.4 nmtui Performance Issues
If nmtui is slow or laggy:
Too many connection profiles: Delete unused ones
Terminal emulator issues: Try a different terminal
Remote session lag: Use nmcli instead for SSH sessions
System resource constraints: Close other applications
9. Best Practices
9.1 Connection Naming
Use descriptive names: Office-Static-192.168.1.100
Include location/purpose: Home-WiFi-5GHz
Avoid generic names: Not "Connection 1", "eth0"
Use consistent naming scheme across systems
Include IP info for static connections
9.2 Configuration Guidelines
Setting
Recommendation
Reason
Automatically connect
Enable for primary connection only
Prevents conflicts
Available to all users
Enable for servers/shared systems
System-wide access
DNS servers
Set multiple (8.8.8.8, 8.8.4.4, 1.1.1.1)
Redundancy
MTU
Leave default unless required
Auto-negotiation works best
MAC cloning
Only use when necessary
Can cause network issues
9.3 Security Best Practices
Security Considerations:
Don't use "Show password" in shared environments
Use WPA2/WPA3 for WiFi, never WEP
Avoid open/unencrypted networks for sensitive data
Regularly update connection passwords
Verify SSID before connecting to WiFi
Use "Available to all users" carefully on multi-user systems
9.4 Documentation Habits
Maintain Documentation:
Keep network diagram with IP assignments
Document static IP allocations
Note which connections are for what purpose
Record DNS server choices and reasons
Document VPN connection details separately
Backup connection files periodically
10. nmtui vs nmcli Quick Reference
10.1 Task Comparison
Task
nmtui
nmcli Equivalent
Create connection
Edit → Add → Fill form → OK
nmcli con add type ethernet con-name "Name" ifname eth0
Edit connection
Edit → Select → Edit → Modify → OK
nmcli con modify "Name" ipv4.addresses "IP"
Activate connection
Activate → Select → Enter
nmcli con up "Name"
Deactivate connection
Activate → Select active → Enter
nmcli con down "Name"
Delete connection
Edit → Select → Delete
nmcli con delete "Name"
Set hostname
Set system hostname → Enter name → OK
nmcli general hostname "name"
View connection details
Edit → Select → Edit (view fields)
nmcli con show "Name"
List connections
Edit (shows list)
nmcli con show
10.2 When to Choose Which Tool
Choose nmtui for:
Initial setup on new systems
Infrequent configuration changes
When you can't remember nmcli syntax
Training new administrators
Visual confirmation of settings
Interactive connection testing
Choose nmcli for:
Scripting and automation
Remote administration
Batch operations
CI/CD pipelines
Quick status checks
Advanced features not in nmtui
11. Advanced Tips and Tricks
11.1 Keyboard Shortcuts
Shortcut
Action
Ctrl+C
Exit nmtui immediately (like Quit)
Ctrl+L
Refresh screen (if display corrupted)
Home
Jump to start of text field
End
Jump to end of text field
Ctrl+A
Select all text in field
Ctrl+K
Delete from cursor to end of line
11.2 Quick Launch Scripts
#!/bin/bash
# Quick network configuration launcher
# Add to ~/.bashrc or ~/.bash_aliases
alias netedit='sudo nmtui edit'
alias netconn='sudo nmtui connect'
alias nethost='sudo nmtui hostname'
# Or create a wrapper
network-config() {
case "$1" in
edit|e)
sudo nmtui edit
;;
connect|c)
sudo nmtui connect
;;
hostname|h)
sudo nmtui hostname
;;
*)
sudo nmtui
;;
esac
}
# Usage:
# network-config edit
# network-config connect
# network-config hostname
11.3 Terminal Optimization
For Best nmtui Experience:
Use terminal with good ncurses support (gnome-terminal, konsole, terminator)
Set minimum terminal size: 80x24 characters
Enable UTF-8 encoding: export LANG=en_US.UTF-8
For SSH: Use ssh -t to force pseudo-terminal
Avoid screen/tmux if having display issues
11.4 Backup and Restore
# Backup all NetworkManager connections
sudo tar -czf nm-backup-$(date +%Y%m%d).tar.gz \
/etc/NetworkManager/system-connections/
# Restore connections
sudo tar -xzf nm-backup-20241025.tar.gz -C /
# Fix permissions
sudo chmod 600 /etc/NetworkManager/system-connections/*
sudo chown root:root /etc/NetworkManager/system-connections/*
# Reload in nmtui
# Just restart nmtui - it will detect changes automatically
# Or reload via command line
sudo nmcli connection reload
12. Integration with System Administration
12.1 Using nmtui in Installation Scripts
#!/bin/bash
# Post-installation network setup
# Check if NetworkManager is running
systemctl start NetworkManager
systemctl enable NetworkManager
# Launch nmtui for user configuration
echo "Please configure network settings..."
nmtui
# Verify connectivity
if ping -c 3 8.8.8.8 &>/dev/null; then
echo "Network configured successfully"
else
echo "Network configuration may need adjustment"
fi
12.2 Monitoring Changes
# Watch for connection file changes
inotifywait -m /etc/NetworkManager/system-connections/ -e modify -e create -e delete |
while read path action file; do
echo "$(date): Connection $file was $action"
done
# Log nmtui usage (for auditing)
alias nmtui='logger "nmtui launched by $USER" && /usr/bin/nmtui'
13. Troubleshooting Connection Issues
13.1 Diagnostic Checklist
Check if NetworkManager is running: systemctl status NetworkManager
Verify device is detected: ip link show
Check device is managed: nmcli device status
Review connection details in nmtui Edit screen
Try activating from nmtui Activate screen
Check system logs: journalctl -u NetworkManager -n 50
Test basic connectivity: ping 8.8.8.8
Test DNS: ping google.com
13.2 Common Error Messages
Error/Symptom
Likely Cause
Fix
"Failed to activate connection"
Wrong IP config or unavailable device
Verify settings in Edit screen, check device status
Connection immediately disconnects
IP conflict or authentication failure
Check for duplicate IPs, verify WiFi password
Device not showing in list
Driver issue or device unmanaged
Check kernel messages, NetworkManager.conf
Can't save changes
Permission denied
Run with sudo: sudo nmtui
14. Reference: Configuration Files
14.1 Where nmtui Stores Settings
# Connection profiles (created/edited by nmtui)
/etc/NetworkManager/system-connections/
# Example connection file
/etc/NetworkManager/system-connections/Wired-connection-1.nmconnection
# NetworkManager main config
/etc/NetworkManager/NetworkManager.conf
# Check current hostname
/etc/hostname
# View connection file
sudo cat /etc/NetworkManager/system-connections/My-Connection.nmconnection
14.2 Connection File Format
[connection]
id=My-Ethernet
uuid=12345678-1234-1234-1234-123456789abc
type=ethernet
autoconnect=true
permissions=
[ethernet]
mac-address-blacklist=
[ipv4]
address1=192.168.1.100/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
dns-search=
method=manual
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]
Note: These files are created and managed by nmtui. You can edit them manually, but using nmtui is safer and ensures proper format.
15. Summary and Quick Start
Quick Start Guide
Launch: sudo nmtui
Create Connection: Edit a connection → Add → Choose type → Fill details → OK
Enable Connection: Activate a connection → Select → Enter
Change Hostname: Set system hostname → Enter name → OK
Exit: Navigate to Quit or press F10
Essential Keyboard Commands
↑ ↓ - Navigate menu items
Tab - Move between fields
Enter - Select/activate
Space - Toggle checkboxes
Esc - Go back/cancel
F10 - Exit nmtui
Remember
nmtui is for interactive configuration
Use nmcli for scripts and automation
Changes are saved to /etc/NetworkManager/system-connections/
Most changes require connection reactivation
Always verify connectivity after changes
Backup connection files before major changes
nmtui - NetworkManager Text User Interface | Complete Reference Guide
For command-line alternative, see nmcli documentation