EP4: Linux CLI vs GUI – Which One Should You Use?

In this episode, we’ll compare Linux CLI (Command Line Interface) and GUI (Graphical User Interface). Which one should you use — especially if you're studying for RHCSA certification?

🖥️ GUI: Graphical User Interface

GUI = Point-and-click interface, with windows, buttons, and icons.

✅ Common GUIs in Linux:

  • GNOME (used in RHEL/Rocky)

  • KDE

  • XFCE (lightweight)

🟢 Pros:

  • Easy to use for beginners

  • Visual and intuitive

  • Good for basic tasks: browsing, file management, system settings

🔴 Cons:

  • Uses more system resources (RAM/CPU)

  • Some advanced admin tasks are hidden or harder to script

  • Not always available in production environments


💻 CLI: Command Line Interface

CLI = Type commands into a terminal. Used via shell (e.g., Bash, Zsh)

✅ CLI in RHEL-based systems is usually bash shell

🟢 Pros:

  • Lightweight and fast

  • Works on servers without GUI

  • Easy to automate using scripts

  • 100% covered in RHCSA exam

🔴 Cons:

  • Steeper learning curve

  • No visual hints

  • You need to memorize or know how to find help

Don’t be scarry to CLI

Most commands are just short abbreviations

Command

Meaning / Origin

Easy to Remember As…

ls

List Segment (or just "list")

Show files/folders

cd

Change Directory

Move into a different folder

pwd

Print Working Directory

Show current location/path

mkdir

Make Directory

Create a new folder

rmdir

Remove Directory

Delete an empty folder

rm

Remove

Delete file or folder

cp

Copy

Copy file/folder

mv

Move

Move or rename

touch

"Touch" = update timestamp (also creates empty file)

Make new blank file

cat

Catenate (join text together)

Show file content

man

Manual

Get help about a command

echo

"Echo" = repeat/show

Print text to screen

sudo

Superuser Do

Do as administrator/root

chmod

Change Mode

Change file permission

chown

Change Owner

Change file owner

ps

Process Status

See running processes

kill

Literally “kill” a process

Stop a running program

top

“Top” of system usage list

Real-time system monitor

df

Disk Free

Show disk space

du

Disk Usage

Check folder size

ip

IP tools (network info)

View IP address

ping

"Ping" = network echo test

Test network connection

df -h → (-h) is a parameter, mean human readable so we can read in easy. If we not sure what parameters we should use we can use man df or df --help


📖 RHCSA & Real-World Focus: CLI is Mandatory

RHCSA = Red Hat Certified System Administrator

In the RHCSA exam:

  • You use only CLI

  • No GUI is provided

  • All tasks are done in terminal (user management, disk setup, firewalld, etc.)

💡 RHCSA CLI Examples:

# Create a user
useradd john

# Set password
passwd john

# Start a service
systemctl start firewalld

# View IP address
ip a

💡 CLI is also used in:

  • Remote access via SSH

  • Scripting automation (bash scripts)

  • System recovery and troubleshooting


🎯 When to Use CLI vs GUI?

Task

Recommended Interface

Server admin tasks

CLI ✅ (always)

Desktop use (browsing, etc)

GUI

RHCSA lab & exam

CLI ✅

Writing scripts/automation

CLI ✅

Quick visual configs

GUI (optional)


🧪 CLI Practice Commands for RHCSA Students

Try these in your Rocky Linux VM:

# View current user
whoami

# List files
ls -l

# View system status
top

# Create and switch directories
mkdir lab
cd lab

# View logs
journalctl -xe

🧠 Tips to Learn CLI Faster

  • Use man pages:
man useradd
  • Use tab-completion

  • Try CLI every day (e.g., update system via CLI):

sudo dnf update -y
  • Practice real scenarios, like:

    • Create a new user

    • Configure firewall

    • Create a partition and mount it


🛠️ How to Switch Between CLI and GUI

If you're using Rocky Linux or RHEL:

Check current target (runlevel):

systemctl get-default

Set CLI only (no GUI):

sudo systemctl set-default multi-user.target

Set GUI:

sudo systemctl set-default graphical.target

Then reboot:

sudo reboot
Updated on