Posted by: admin (Oct 22)
For those who use the power of the Linux shell is certainly not escaped the use of ssh, the power of the instrument will stop only when we need to disconnect while leaving running a process launched from our session. The system is ruthless, and in case of disconnecting all the processes triggered by us are killed immediately. To overcome this there is the command screen ready to come to the aid adding further efficiency to the shell of our remote linux box. Screen is a "multiplier terminal" that allows us to manage multiple terminals, "release" from a session, and "hang up".

- screen screen and start us back our shell: we can work as if nothing had happened.
- screen + NomeProgramma start the program within NomeProgramma screen, as with the shell.
- pressing ctrl + a and c within a screen session we will create a new terminal.
- pressing ctrl + n and then to move on to the next terminal.
- pressing ctrl + a and p then move on to the terminal before.
- pressing ctrl + a and then d "drop" screen from our current session, maintaining running commands pending. Now we can finish our ssh session with the certainty that our processes will not kill.
- screen-r session retrieves a previously "released".
Example (update of a remote system via yum):
First link:
- ssh host.domain
- screen yum-y update
- Crtl + a
- d
- exit
Second Link:
- ssh host.domain
- screen-r
- If still running yum will show us is doing. If yum has finished its task will display the message [screen is terminating]
- exit
2 Comments



































