Using screen command in Linux to keep-alive remote shell commands even after disconnects

1
0

Using screen command in Linux to keep-alive remote shell commands even after disconnects

  • Connect to the remote host using
ssh someuser@somehost
  • Run screen command
screen
  • Run your command that will take some time

  • Press CTRL-A then D to detach from your screen session. A disconnect also can detach you from the session. Here the command is still running

  • Any time after detaching from the screen session you can restore it by:

screen -r

Few more screen options:

  • List screen scessions: screen -ls
  • Create a new screen session from an active session CTRL+A then C
  • Switch to the next screen session CTRL+A then N
  • Switch to the previous screen session CTRL+A then P

 

Comments

لا يوجد
zedony.com - A mmonem.com production