0
0
Linux CLIscripting~10 mins

Background processes (&) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run the command sleep 10 in the background.

Linux CLI
sleep 10 [1]
Drag options to blanks, or click blank then click option'
A&
B&&
C|
D;
Attempts:
3 left
💡 Hint
Common Mistakes
Using '&&' runs the next command only if the first succeeds, not backgrounding.
Using '|' pipes output to another command, not backgrounding.
Using ';' runs commands sequentially, not in background.
2fill in blank
medium

Complete the code to run ping google.com in the background.

Linux CLI
ping google.com [1]
Drag options to blanks, or click blank then click option'
A&&
B;
C|
D&
Attempts:
3 left
💡 Hint
Common Mistakes
Using '&&' runs the next command only if the first succeeds, not backgrounding.
Using '|' pipes output, not background.
Using ';' runs commands one after another, not background.
3fill in blank
hard

Fix the error in the command to run ls -l in the background.

Linux CLI
ls -l [1]
Drag options to blanks, or click blank then click option'
A&
B|
C&&
D;
Attempts:
3 left
💡 Hint
Common Mistakes
Using '&&' runs commands conditionally, not background.
Using '|' pipes output, not background.
Using ';' runs commands sequentially, not background.
4fill in blank
hard

Fill both blanks to run sleep 5 in the background and then list jobs.

Linux CLI
sleep 5 [1] [2] jobs
Drag options to blanks, or click blank then click option'
A&
B&&
C;
D|
Attempts:
3 left
💡 Hint
Common Mistakes
Using ';' runs commands sequentially but does not ensure sleep is backgrounded.
Using '|' pipes output, which is not needed here.
5fill in blank
hard

Fill both blanks to run echo Hello in background, then run date only if echo succeeds, finally list jobs.

Linux CLI
echo Hello [1] date [2] jobs ;
Drag options to blanks, or click blank then click option'
A&
B&&
C;
D|
Attempts:
3 left
💡 Hint
Common Mistakes
Using '|' pipes output, which is not needed here.
Using ';' instead of '&&' loses conditional execution.