Skip to content

Instantly share code, notes, and snippets.

@ValterAndrei
Last active June 9, 2025 11:18
Show Gist options
  • Save ValterAndrei/84e480a30c452ad10ef62453653884cf to your computer and use it in GitHub Desktop.
Save ValterAndrei/84e480a30c452ad10ef62453653884cf to your computer and use it in GitHub Desktop.
Guia rápido: Usando screen no Ubuntu

Para criar uma screen no Ubuntu:

screen -S relatorio

Depois disso, você estará dentro da screen. Para sair sem encerrar:

Ctrl + A, depois D

Para listar as screens ativas:

screen -ls

Para voltar a uma screen:

screen -r relatorio

Para matar uma screen:

# de fora
screen -X -S relatorio quit

# de fora, fechar todas
screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs -r kill

# de dentro
exit

Para saber se você está dentro de uma screen:

echo $STY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment