use 'screen' or 'tmux'.
- ssh into your remote box. type
screen
Then start the process you want. - Press Ctrl-A then Ctrl-D. This will "detach" your screen session but leave your processes running. You can now log out of the remote box.
- If you want to come back later, log on again and type "screen -r" This will "resume" your screen session, and you can see the output of your process.
To get the same functionality as explained in the post with the most votes you would need to do the following:
- ssh into the remote machine
- start
tmux
by typingtmux
into the shell - start the process you want inside the started
tmux
session - leave/detach the
tmux
session by typingCtrl-B
and thenD
tmux
. When you come back again and want to check the status of your process you can usetmux attach
to attach to yourtmux
session.
If you want to have multiple session running side-by-side you should name each session using Ctrl-B and $. You can get a list of the currently running sessions usingtmux list-sessions
.
According to wikipedia: 'screen' latest release is in August 2008 and 'tmux' latest release is in March 2013.
No comments:
Post a Comment