DEV Community

Cover image for 14.Default GUI Boot Configuration
Thu Kha Kyawe
Thu Kha Kyawe

Posted on

14.Default GUI Boot Configuration

Lab Information

With the installation of new tools on the app servers within the Stratos Datacenter, certain functionalities now necessitate graphical user interface (GUI) access.

Adjust the default runlevel on all App servers in Stratos Datacenter to enable GUI booting by default. It's imperative not to initiate a server reboot after completing this task.

Lab Solutions

🧭 Part 1: Lab Step-by-Step Guidelines

πŸ”Ή Step 1: Log in to Jump Host

ssh thor@jump_host.stratos.xfusioncorp.com

Password:

mjolnir123

πŸ” Perform the following steps on ALL three App Servers

πŸ”Ή Step 2: SSH into each App Server

App Server 1
ssh tony@stapp01.stratos.xfusioncorp.com
Ir0nM@n

App Server 2
ssh steve@stapp02.stratos.xfusioncorp.com
Am3ric@

App Server 3
ssh banner@stapp03.stratos.xfusioncorp.com
BigGr33n

πŸ”Ή Step 3: Switch to root

sudo -i
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Step 4: Set default target to GUI

systemctl set-default graphical.target
Enter fullscreen mode Exit fullscreen mode

πŸ”Ή Step 5: Verify default target

systemctl get-default
Enter fullscreen mode Exit fullscreen mode

Expected output:

graphical.target

πŸ” Repeat Steps 2–5 on all three app servers

βœ… Final Checklist

βœ” Completed on stapp01
βœ” Completed on stapp02
βœ” Completed on stapp03
βœ” Default target set to graphical.target
βœ” Verified using systemctl get-default
βœ” No reboot performed


🧠 Part 2: Simple Step-by-Step Explanation (Beginner Friendly)

πŸ”Ή What is β€œrunlevel” in modern Linux?

Older Linux used:

runlevel 3 β†’ CLI
runlevel 5 β†’ GUI

Modern systems use systemd targets instead:

Old Runlevel New Target
3 multi-user.target
5 graphical.target

πŸ”Ή What does systemctl set-default graphical.target do?

It changes the default boot mode.

Instead of booting into:

multi-user.target (command line only)

The system will boot into:

graphical.target (GUI enabled)

πŸ”Ή Why no reboot?

The lab specifically says:

Do NOT reboot.

set-default only changes what will happen at the next boot.

It does not affect the current session.

πŸ”Ή How to verify?

systemctl get-default

If it prints:

graphical.target

You are done.

πŸ” Real-World Context

GUI boot is required when:

Desktop-based tools are installed

X11 forwarding is used

Monitoring dashboards require local display

Servers usually run CLI-only, but some tools require GUI.


Resources & Next Steps
πŸ“¦ Full Code Repository: KodeKloud Learning Labs
πŸ“– More Deep Dives: Whispering Cloud Insights - Read other technical articles
πŸ’¬ Join Discussion: DEV Community - Share your thoughts and questions
πŸ’Ό Let's Connect: LinkedIn - I'd love to connect with you

Credits
β€’ All labs are from: KodeKloud
β€’ I sincerely appreciate your provision of these valuable resources.

Top comments (0)