1, the simplest method:
Command &
For example:
Top &
The job number and background process number are displayed
[114814
2. Running programs are put into the background
Ctrl-z
3. See what background processes and status
Jobs
4. Switch the background process to the foreground execution
FG Job number
5, let the background suspended process continue to execute
BG Job number
6, kill the background execution program
Kill %job Number
7, let the program in the background to execute, close the terminal does not quit
For example a continuous output program test.sh, as follows
while [True] do Echo Hello Sleep 1 Done
Want to continue execution after closing the terminal
Nohup./test. SH &
Default program output in the Nohup.out file
Check the process after exiting the terminal and re-login
PS grep Test. SH
Kill process, use Kill + process number
8, with the help of screen gadget to complete
Yum Install Screen
Enter screen and enter a new virtual terminal to perform the task.
Enter <Ctrl> + <a>, <D> exit current screen
<Ctrl> + <a>, <D>
View all backend Terminals
Screen-list
Restore a terminal that has just been shut down
Screen-r
Linux command background Execution tips Summary