nmcli vs nmtui: Which One to Use in the RHCSA Exam?
Published On: 30 May 2025
Objective
Networking is a cornerstone of modern Linux system administration and the RHCSA (Red Hat Certified System Administrator) exam reflects that. Whether you are configuring static IP addresses, setting hostnames or ensuring a system can reach the outside world, your ability to manage networking reliably is under close scrutiny. But here is a dilemma many RHCSA candidates face: Should I use nmcli or nmtui during the exam? Both tools are available, both are valid and both can achieve the required results. Yet confusion over which one is "correct" often leads to hesitation, mistakes or misconfigurations and that could cost you valuable points.
In this blog, we will clear up the misconceptions, break down when and why to use each tool and help you avoid the common networking mistakes that trip up otherwise well-prepared candidates.
Understanding the Tools
Before we compare them, let us understand what these tools actually are.
-
What is nmcli?
nmcli stands for Network Manager Command Line Interface. It is a command-line utility used to manage network connections. You can use it to create, modify, delete, activate, or deactivate network connections.
Pros of nmcli:
-
Scriptable: Ideal for automation and remote management.
-
Precise: Gives you fine-grained control over every aspect of the connection.
-
Enterprise-ready: Widely used in real-world environments, especially in headless server setups.
-
Fast for experienced users: Once you're fluent, it's much quicker than navigating menus.
Example:
nmcli con add type ethernet con-name static1 ifname eth0 ip4 192.168.1.100/24 gw4 192.168.1.1 # Creates a new Ethernet connection named 'static1' on interface eth0 with static IP and default gateway
nmcli con mod static1 ipv4.dns "8.8.8.8" # Sets the DNS server for the connection to 8.8.8.8 (Google DNS)
nmcli con mod static1 connection.autoconnect yes # Ensures the connection will automatically start at system boot
nmcli con up static1 # Activates (brings up) the connection immediately
-
What is nmtui?
nmtui stands for Network Manager Text User Interface. It provides a graphical interface inside the terminal, using arrow keys and enter to navigate. Think of it as a command-line “menu” for networking.
Pros of nmtui:
-
User-friendly: No need to memorize commands.
-
Visual guidance: Great for candidates who learn better visually.
-
Quicker for beginners: Easier under exam stress if you're not 100% comfortable with nmcli.
-
To start it, just run:
nmtui # Opens the menu-driven text interface for editing and activating network connections
-
It opens a menu-driven interface where you can edit connections, activate/deactivate interfaces, and set the hostname.
RHCSA Exam Requirements
The RHCSA exam doesn’t care which tool you use, it cares about what works and whether it is done persistently.
Here is what matters:
-
Persistent configuration: Your network settings must survive a reboot. If they vanish when the system restarts, you will not get credit.
-
Correct routing and DNS: The gateway and DNS settings must be correct and tested.
-
Hostname configuration: Make sure the hostname is set properly and is persistent.
-
Connection must auto-connect: Set connection.autoconnect yes to ensure the connection starts on boot.
This means that whether you use nmcli or nmtui, you must verify everything thoroughly.
Common Mistakes That Lead to a Zero
Even if you manage to configure networking and get it working during the exam, you could still lose points if certain mistakes go unnoticed.
Here are some of the most common:
-
Not making settings persistent: Using temporary commands like ip addr add or ip route add will NOT survive a reboot. The exam checks whether your system still works after restarting.
Fix: Always use nmcli or nmtui to create persistent configurations under /etc/NetworkManager/system-connections/.
-
Forgetting to bring up the connection: After creating or modifying a connection, you must bring it up:
nmcli con up static1 # Brings the connection named 'static1' up (activates it)
If the connection is down, networking won’t work no matter how well you configured it.
-
Not verifying your setup: Always confirm your work with:
nmcli con show # Lists all configured connections and their current status
ip a # Displays IP addresses assigned to all interfaces
ping 8.8.8.8 # Tests external network connectivity using Google's public DNS
systemctl status NetworkManager # Checks if the NetworkManager service is active and running
Do not assume — verify!
-
Not testing after reboot: You must reboot and confirm that the IP address, routing, and DNS settings are still in place.
reboot # Reboots the system
# After reboot, run:
ip a # Verify IP is still present
ping google.com # Confirm internet connectivity by pinging a domain name
If things do not work after a reboot, fix them immediately. Do not move on until you are sure it is persistent.
When to Use Which Tool
Use nmtui if:
-
You are more comfortable with a menu-based interface.
-
You are nervous about syntax errors in a high-pressure exam.
-
You want to avoid memorizing command structures under stress.
Use nmcli if:
-
You are confident in the terminal and want to speed things up.
-
You are preparing for automation or want better control over scripts.
-
You want to prepare for real-world enterprise use.
Bottom line: Both tools are valid. The only thing that matters is that your configuration is correct, complete and survives a reboot.
Additional: Hostname Configuration
-
Don't forget to configure the hostname:
hostnamectl set-hostname rhcsa-node1 # Sets the system hostname to rhcsa-node1
hostnamectl # Displays current hostname and other related info
Comparison table between nmcli
and nmtui
, specifically tailored for RHCSA exam use
Feature / Criteria | nmcli (Command-Line Interface) | nmtui (Text-Based User Interface) |
---|---|---|
Interface Type | Command-line | Text-based menu in terminal |
Ease of Use | Requires knowledge of syntax and options | User-friendly; menu-driven navigation |
Speed | Faster for experienced users | Slower due to manual navigation |
Scriptability | Fully scriptable; excellent for automation and remote config | Not scriptable |
Ideal For | Confident terminal users, automation, headless/server setups | Beginners, visual learners, quick manual edits |
Syntax Memorization | Requires memorizing commands and structure | Minimal command knowledge needed |
Error Handling | Prone to syntax errors if not careful | Fewer errors due to guided options |
Availability | Always available on RHEL systems | May be unavailable in minimal or headless installations |
Recommended for Exam | Yes – offers full control and efficiency | Yes – great for stress-free setup under time constraints |
Persistence Support | Yes – creates persistent settings in NetworkManager configs | Yes – also writes to persistent config files |
Hostname Configuration | Supported (via hostnamectl ) |
Supported from within the nmtui menu |
Auto-Connect Support | Yes (connection.autoconnect yes ) |
Yes (through GUI toggle) |
Learning Curve | Steeper, but worth mastering for real-world use | Very low – quick to pick up and use |
Conclusion
Be clear: it’s not about whether you use nmcli or nmtui. It’s about getting the job done correctly, persistently, and verifiably. The RHCSA exam doesn’t reward the tool you choose, it rewards your ability to configure and troubleshoot real-world Linux systems in a way that survives reboots and holds up under scrutiny. Master both tools if you can. Use the one that fits your workflow and comfort level. But whatever you choose, test everything, reboot, and verify that your networking setup works as expected.
If you're serious about passing the RHCSA exam and want structured, lab-based preparation that mirrors the real testing environment, consider using resources like RHCSA.GURU, which offers realistic labs based on RHEL 9, guided video walkthroughs, scenario-based networking challenges, and a community of mentors. It’s not just about studying harder—it’s about studying smarter and building the confidence to succeed.