logoalt Hacker News

lefra • today at 5:42 AM • 2 replies • view on HN

Before long-running commands, open a screen [1] session. That way, if you get disconnected, the job keeps running, and you can reconnect to the screen session afterwards.

The man page is quite long, use "screen -R <appropriate name" to create the session or reconnect to it, and (IIRC) CTRL-A D to exit screen without closing the session.

[1] https://man7.org/linux/man-pages/man1/screen.1.html


Replies

pezezin • today at 10:16 AM

Nowadays screen is considered legacy and it is recommended to use tmux, but the idea is the same.

➕ show 1 reply
aurareturn • today at 5:47 AM

It was my first time doing it. I didn’t know it’d be such a frustrating experience.