If you use SSH in your daily life, make a habit of using `screen`

Start a new screen session: screen

Start a named session: screen -S session_name

List active sessions: screen -ls

Attach to a session: screen -r session_name

Detach from a session: Ctrl+A, D

#linux #terminal #ubuntu #ssh

Reply to this note

Please Login to reply.

Discussion

Cool. Why? Is this to prevent staying logged into an agent? What is the benefit? honest q, learning here.

It's good for remotely running long running processes.

That's why I came across `screen`

ssh

screen

./program

ctrl+Detach

exit

good to know, thank you. 🤝

Add this into your. bash_functions

scr ()

{

echo "Disconnect from your screen session: CTRL-A, d";

echo "Open another screen 'window': CTRL-A, c";

echo "Cycle through you open screen windows: CTRL-A, space";

read -p "Press enter to continue";

screen -ls | grep --color=auto -q Main && screen -xr Main || screen -S Main

}

export - f scr

Now you have a shortcut that remembers if you had a running session.

ssh, screen and vi.

This is everything you need to rule the world

And make a new screen screen…ctrl+a,n? Or is it just ctrl+number…

Anyhow, screen is a great tool for manually started bitcoin nodes and Blockstream satellite monitoring/reporting.