Linux Shell background running and foreground Conversion
When Bash is used to startProgram, You can use it in the background to add and implement the program to run in the background;
Example: Emacs &
But if you forget to enter &; but you do not want to stop the program and restart it;
You can do this:
Press Ctrl + Z to pause front-end work, for example, the Emacs
Run the jobs command to check the total number of programs started by Bash. You can see that your Emacs is in the stoped state, and its jobid can also be seen, for example, 2.
Then run the command BG 2;
In this way, you can achieve the same effect as Emacs.
Some work, such as updatedb and find, takes some time. These work can be considered to run in the background, and you can use Bash to do other work.
If you want to return the task to the foreground, you only need FG 2.