Use Screen to Run Long Processes
Tech TipScreen is a Linux utility that allows you to run multiple terminals all within a single terminal window manager. It can be used for many things and greatly increases workflow. Screen enables you to run your long scripts/processes within a screen session.
If you want to execute a script that generally takes a very long time to complete, it can be beneficial to run that script inside of a screen session. That way, if you lose your SSH connection, your script will keep running.
To start a screen, you can simply run the command ‘screen’. This places you into a new terminal window. From there, you can execute bash commands in the usual way. Once you have started your process, you can disconnect from your screen with the key combo: ctrl-a + d
This will take you back to your original SSH terminal session. To rejoin your screen, you can use the command ‘screen -r’. Once you are back in your screen session, you will see that your process has been running in your absence. This is a great way to ensure that your processes finish even if you lose your connection.
There are a multitude of uses for the Linux screen application, and all Linux users should become familiar with it. For a full list of screen commands, type ‘man screen’ while in a terminal.
Categories
- Getting Support (5)
- Hardware (35)
- Areca Raid Arrays (3)
- InfiniBand (10)
- LSI Raid Arrays (9)
- NVIDIA Graphics Cards (1)
- Racks (1)
- Troubleshooting (8)
- Software (11)
- ACT Utilities (5)
- HPC apps & benchmarks (1)
- Linux (3)
- Schedulers (3)
- SGE / Grid Engine (1)
- TORQUE (1)
- Tech Tips (17)
Request a Consultation from our team of HPC and AI Experts
Would you like to speak to one of our HPC or AI experts? We are here to help you. Submit your details, and we'll be in touch shortly.