0
0
Linux CLIscripting~20 mins

Terminal vs GUI in Linux CLI - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Terminal vs GUI Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What is the output of this command?
You run the command ls -l /tmp in a terminal. What does this command do?
Linux CLI
ls -l /tmp
ALists files and directories in /tmp with detailed info like permissions, owner, size, and modification date.
BOpens the /tmp directory in a graphical file manager window.
CDeletes all files in the /tmp directory without confirmation.
DDisplays the current disk usage of the /tmp directory.
Attempts:
2 left
💡 Hint
Think about what the ls command does and what the -l option adds.
🧠 Conceptual
intermediate
1:30remaining
Why might a user prefer a terminal over a GUI?
Which of the following is a common reason users choose to use a terminal instead of a graphical user interface (GUI)?
ATerminals automatically update software without user input.
BTerminals provide colorful icons and drag-and-drop features.
CTerminals allow faster and more precise control through typed commands and scripts.
DTerminals use less electricity than GUIs.
Attempts:
2 left
💡 Hint
Think about what typing commands can do compared to clicking icons.
🔧 Debug
advanced
2:00remaining
Why does this GUI automation script fail?
This script is supposed to open a text editor and type 'Hello' automatically using GUI automation tools. Why does it fail?
Linux CLI
import pyautogui
pyautogui.write('Hello')
pyautogui.press('enter')
AThe 'write' function is misspelled and causes a syntax error.
BThe script runs too fast before the text editor window is open and focused.
CThe script requires root permissions to type automatically.
DThe 'enter' key is not a valid key name in pyautogui.
Attempts:
2 left
💡 Hint
Think about what must happen before typing can work in a GUI.
🚀 Application
advanced
1:30remaining
How to switch from GUI to terminal in Linux?
You are using a Linux desktop with a GUI. Which key combination lets you switch to a terminal console (TTY)?
ACtrl + C
BCtrl + Shift + Esc
CAlt + Tab
DCtrl + Alt + F3
Attempts:
2 left
💡 Hint
Think about function keys and how Linux manages multiple consoles.
🧠 Conceptual
expert
2:00remaining
What is a key advantage of scripting in terminal over GUI automation?
Which advantage best explains why scripting in a terminal is often preferred over GUI automation for repetitive tasks?
ATerminal scripts are less dependent on screen resolution and GUI layout changes.
BTerminal scripts require less knowledge of command syntax.
CGUI automation scripts run faster on all systems.
DGUI automation scripts never fail due to user interface changes.
Attempts:
2 left
💡 Hint
Consider what can break GUI automation scripts easily.