+2 votes
in Operating Systems by (40.7k points)

I had created a screen session on a remote server machine using screen command to run my program that takes several hours to finish. I got disconnected. What command should I use to reconnect to my screen session after logging into the remote machine?

1 Answer

+1 vote
by (157k points)
selected by
Best answer

You can use the following command to reattach/reconnect to your screen session after logging back in:

$ screen -d -r

It will reattach a session and if necessary detach it first.You can run command 'man screen' on the terminal to see the details.