Use screen to detach from work

Within an SSH connection, if you start an interactive program it is likely to stop working when you close your terminal. You can set up your VM so that the program will keep working after you close your connection. You can use a program called screen for that.


while sleep 2
chmod u+x

First detach

# look for a line like this:
#  ...

Food for brain:

Is pstree command installed? If not, are you able to figure out how to install it? After all, you are the sysadmin!

Suggestion just in case:

Using nohup

nohup ./ &

The output will be:

nohup: ignoring input and appending output to ‘nohup.out’
tail -f nohup.out
tail -f nohup.out

For more information read the manual, it is small and simple but effective.

man nohup

Using screen

You will use a program called screen. Similar programs are: tmux, dtach+dtvm.


[detached from 14691.pts-0.145]
screen -r

Multiple screen sessions

screen command has a lot of options. Reading the manual page will provide you with a wealth of information.


Start additional session

Play with these switching commands between the three sessions using control-a and a digit or the control-a control-a sequences

Split screen