Bird
Raised Fist0
Linux CLIscripting~5 mins

Opening and using the terminal in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What is a terminal in Linux?
A terminal is a program that lets you type commands to control your computer. It is like talking to your computer using words instead of clicking icons.
Click to reveal answer
beginner
How do you open the terminal on most Linux systems?
You can open the terminal by pressing Ctrl + Alt + T or by searching for "Terminal" in the applications menu.
Click to reveal answer
beginner
What does the command pwd do in the terminal?
The pwd command shows the current folder you are in. It stands for "print working directory."
Click to reveal answer
beginner
How can you list files and folders in the terminal?
Use the command ls to see all files and folders in the current directory.
Click to reveal answer
beginner
Why is using the terminal helpful?
The terminal lets you do tasks faster and more precisely. It is useful for automation, fixing problems, and running programs without a mouse.
Click to reveal answer
Which key combination usually opens the terminal in Linux?
ACtrl + C
BCtrl + Shift + N
CAlt + F4
DCtrl + Alt + T
What does the command ls do?
APrints the current directory
BLists files and folders
CDeletes files
DCreates a new folder
What is the terminal mainly used for?
ATyping commands to control the computer
BBrowsing the internet
CWatching videos
DEditing photos
What does the command pwd show?
ADisk usage
BList of files
CCurrent folder path
DSystem time
Which of these is NOT a reason to use the terminal?
APlaying games
BPrecise control
CFaster task execution
DAutomation
Explain how to open the terminal and why it is useful.
Think about how you start the terminal and what you can do with it.
You got /4 concepts.
    Describe the purpose of the commands pwd and ls.
    These commands help you know where you are and what is inside the folder.
    You got /3 concepts.

      Practice

      (1/5)
      1. What is the main purpose of opening a terminal on a Linux system?
      easy
      A. To type commands to control the computer
      B. To watch videos
      C. To browse the internet
      D. To play music

      Solution

      1. Step 1: Understand what a terminal does

        The terminal allows users to type commands to control and manage the computer.
      2. Step 2: Compare options with terminal use

        Watching videos, browsing internet, and playing music are done with other apps, not the terminal.
      3. Final Answer:

        To type commands to control the computer -> Option A
      4. Quick Check:

        Terminal = command control [OK]
      Hint: Terminal is for commands, not media [OK]
      Common Mistakes:
      • Thinking terminal is for media
      • Confusing terminal with GUI apps
      • Not knowing terminal controls computer
      2. Which of the following commands correctly opens a new terminal window in most Linux desktop environments?
      easy
      A. gnome-terminal
      B. open-terminal
      C. start-terminal
      D. launch-term

      Solution

      1. Step 1: Identify common terminal commands

        The command gnome-terminal is the standard way to open a terminal window in GNOME desktop.
      2. Step 2: Check other options

        Commands like open-terminal, start-terminal, and launch-term are not standard Linux commands.
      3. Final Answer:

        gnome-terminal -> Option A
      4. Quick Check:

        Standard terminal command = gnome-terminal [OK]
      Hint: Remember GNOME uses gnome-terminal command [OK]
      Common Mistakes:
      • Typing non-existent commands
      • Confusing Windows commands with Linux
      • Using wrong command names
      3. What will be the output of the command pwd immediately after opening a new terminal?
      medium
      A. /usr/bin
      B. /root
      C. /etc
      D. /home/username

      Solution

      1. Step 1: Understand what pwd does

        The pwd command shows the current directory path.
      2. Step 2: Know the default directory on terminal open

        When a user opens a terminal, it usually starts in their home directory, like /home/username.
      3. Final Answer:

        /home/username -> Option D
      4. Quick Check:

        New terminal starts in home directory [OK]
      Hint: New terminal starts in your home folder [OK]
      Common Mistakes:
      • Assuming root or system folders
      • Not knowing pwd shows current folder
      • Confusing with other commands
      4. You typed ls -l but got an error: ls: command not found. What is the most likely cause?
      medium
      A. You are not in the home directory
      B. You need to use list -l instead
      C. The ls command is not installed or PATH is broken
      D. You forgot to open the terminal

      Solution

      1. Step 1: Understand the error message

        The error command not found means the system cannot find the ls command.
      2. Step 2: Identify common causes

        This usually happens if the command is missing or the PATH environment variable is broken.
      3. Final Answer:

        The ls command is not installed or PATH is broken -> Option C
      4. Quick Check:

        Command not found = missing command or PATH issue [OK]
      Hint: Command not found means missing or PATH error [OK]
      Common Mistakes:
      • Thinking directory location matters
      • Using wrong command names
      • Ignoring terminal must be open
      5. You want to open a terminal and immediately list all files in your Documents folder. Which command should you use?
      hard
      A. open-terminal ls Documents
      B. gnome-terminal -- bash -c "ls ~/Documents"
      C. start-terminal -list ~/Documents
      D. terminal ls -all Documents

      Solution

      1. Step 1: Understand how to open terminal and run a command

        The command gnome-terminal -- bash -c "ls ~/Documents" opens a terminal and runs ls ~/Documents.
      2. Step 2: Check other options for correctness

        Other options use invalid commands like open-terminal, start-terminal, or wrong syntax.
      3. Final Answer:

        gnome-terminal -- bash -c "ls ~/Documents" -> Option B
      4. Quick Check:

        Open terminal and run command = gnome-terminal -- bash -c [OK]
      Hint: Use gnome-terminal with bash -c to run commands [OK]
      Common Mistakes:
      • Using non-existent commands
      • Wrong syntax for running commands
      • Not quoting commands properly
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard