back home

Rsync two servers without staying logged in

June 10, 2017

Install Screen

$ sudo apt-get install screen

and then run screen then run your command

Close the current screen:
Ctrl+a+d

List of Screens:

$ screen -ls

There is a screen on:
    31248.pts-0.ubuntu  (01/07/17 08:54:29) (Detached)
1 Socket in /var/run/screen/S-root.

Enter the screen:

$ screen -r 31248

Quit screen:
First enter the screen, and then:
Ctrl+a then type capital K and choose y

PS: Screen will automatically quit after the code you run is complete