8

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.

0

1 Answer 1

11

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

3
  • In putty session the compilation is executing. So how do in between i type the screen command?
    – Mukesh
    Commented Apr 14, 2017 at 5:20
  • You need to first type screen and then start your compilation
    – Sava
    Commented Apr 14, 2017 at 9:06
  • 1
    Even easier to remember: Always use "screen -R". If possible, it will reattach the previous session, else it will start a new one.
    – gebbissimo
    Commented May 28, 2019 at 15:17

Not the answer you're looking for? Browse other questions tagged .