Screen
From WiskiHow to use screen.
Installation
Debian: #apt-get install screen
Usage
After installation just launch the program by command screen. Next start some other program, like top or nano, inside the new session. Now you can safely detach from the screen session by pressing Ctrl + a and d. You are back in your original session. Logout and come back later. When you return just give screen -r command and you are back in your screen session.