This question already has an answer here:

I am compiling some code on my Linux machine. And I was using putty to access the Linux machine on my windows laptop.

So now in between I need to close my "windows machine". So, putty session will also close. But I want to continue my compilation.

marked as duplicate by muru, Florian Diesch, Terrance, Eric Carvalho, Zanna Apr 14 '17 at 4:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 6 down vote accepted

Just type

screen

And you will be inside the 'screen window' Then you can execute your command. If you close putty now, your command will keep running. Next time you log in to the Linux machine, you can execute

screen -r

And continue where you left off.

You can also manually detach the screen session by hitting ctrl+a followed by d

  • In putty session the compilation is executing. So how do in between i type the screen command? – Mukesh Apr 14 '17 at 5:20
  • You need to first type screen and then start your compilation – Sava Apr 14 '17 at 9:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.