Action
Use screen command to prevent "Broken Pipe" messages and terminal session timeouts
Why?
Instructions
Basic Linux Screen Usage
After connecting to a machine from PuTTY, terminal, etc., type
screen
- Run the desired program
Use the key sequence ctrl ad to detach from the screen session, this will keep it running in the background and return to your main shell
- Note, if you do not detach the session, you can restore if the connection drops by reconnecting and running screen -r
To see a list of active screen sessions, type
screen -ls
Reattach to the screen session by typing
screen -r [your session id here]
There are many useful tutorials for using screen to preserve terminal sessions, here is one: https://linuxize.com/post/how-to-use-linux-screen/#starting-linux-screen
Basic tmux usage
After connecting to a machine from PuTTY, terminal, etc., type
tmux
- Run the desired program
- Use the key sequence Ctrl+b d to detatch the session
To see a list of active tmux sessions
tmux -ls
To reattach a tmux session type
tmux attach-session -t [your session id here]
There are many useful tutorials for using tmux to preserve terminal sessions, here is one: https://linuxize.com/post/getting-started-with-tmux/#starting-your-first-tmux-session