$
Learn Linux handbook
en
XP:0
Quest 64Juggler
+220 XP

Running Jobs in the Background

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Imagine trying to copy a massive folder to a USB drive, but while it copies, you want to keep working and typing other commands in the same window. In Linux, we can run time-consuming tasks in the "background" so they don't lock up our command line.

- Adding an ampersand & to the end of a command (like sleep 100 &) tells the terminal to run it in the background and give you your prompt back immediately.
- The jobs command shows what is currently running in the background.
- The fg (foreground) command pulls a background task back to center stage.

Let's multi-task. Run sleep 100 & to start a background task, check it with jobs, and then pull it back to the foreground by running fg.

Command Syntax Reference

Command / SyntaxDescription
sleep 100 &Run sleep in the background
jobsList background jobs
fgBring background job to foreground

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Run a sleep command in the background (&)
  • ○
    Run the "jobs" command
  • ○
    Bring the job back to foreground with "fg"

Ready to complete Quest 64?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.