Recall & Review
beginner
What does adding an ampersand (&) at the end of a command do in bash?
It runs the command in the background, allowing you to continue using the terminal without waiting for the command to finish.
Click to reveal answer
beginner
How can you check the list of background jobs running in your current shell session?
Use the
jobs command to see all background jobs with their job numbers and status.Click to reveal answer
beginner
What is the difference between running a command normally and running it with & in bash?
Normally, the shell waits for the command to finish before accepting new input. With &, the shell starts the command and immediately returns control to you.
Click to reveal answer
intermediate
How do you bring a background job back to the foreground in bash?
Use the
fg command followed by the job number, for example fg %1 to bring job 1 to the foreground.Click to reveal answer
beginner
Why might running commands in the background be useful?
It lets you keep working in the terminal while long tasks run without blocking your input, like downloading files or running scripts.
Click to reveal answer
What symbol do you add at the end of a bash command to run it in the background?
✗ Incorrect
The ampersand (&) runs the command in the background.
Which command lists all background jobs in the current shell?
✗ Incorrect
The 'jobs' command shows all background jobs.
How do you bring a background job with job number 2 to the foreground?
✗ Incorrect
Use 'fg %2' to bring job 2 to the foreground.
What happens if you run a command without & at the end?
✗ Incorrect
Without &, the command runs in the foreground and blocks the terminal.
Why would you want to run a command in the background?
✗ Incorrect
Running in background lets you run multiple commands without waiting.
Explain how to run a command in the background and how to check its status.
Think about how you keep working while a task runs.
You got /2 concepts.
Describe how to bring a background job back to the foreground and why you might do that.
Sometimes you want to control a running task again.
You got /3 concepts.