In this article, we would like to show you how to work with multiple tasks in Bash.
1. run some command that blocks console, e.g.:
Hint: to run the command directly in the background add
&at the end, e.g.
sleep 60 &.
Z to put command to the background (detaching)
now you can run more commands and press
3. run the following command to display background jobs
-l is optional and means list.
- 34835 Stopped sleep 60 + 34836 Stopped sleep 60
4. to bring the process back to the terminal (attaching) run the following command:
fg 1 # or: fg 2