Linux command - screen running program in background

Background process: screen
1. When opening a child bash window, closing the parent bash does not affect the child bash

1. Install
[root@oldboy ~]# yum install screen -y

2. Open a screen window, specify the name
[root@oldboy ~]# screen -S wget_mysql

3. Just execute the task in the screen window

4. Exit screen smoothly, but will not terminate the tasks in the screen. Note: If you use exit, the screen window is really closed
ctrl+a+d

5. Check which
screens are currently running [root@oldboy ~]# screen -list
There is a screen on:
22058.wget_mysql (Detached)
1 Socket in /var/run/screen/S-root.

6. Enter the running screen
[root@oldboy ~]# screen -r wget_mysql
[root@oldboy ~]# screen -r 22058

Guess you like

Origin blog.51cto.com/paitoubing/2544465