Use “nohup” to keep processes running on Shaheen even after exiting
Sometimes, we have to run a script for a long time on the Shaheen login nodes. One example would be the installation of large third-party software. If we initiate the script directly on the Shaheen login nodes, the script will be terminated once the connection to Shaheen is interrupted for any reason. To keep processes running on Shaheen even after exiting the remote login shell, we can use the Linux command “nohup”:
nohup test.sh >& test.sh.log &
1. “test.sh” is the script you would like to run.
2. “nohup” is a command in Linux systems that keep processes running even after exiting the shell or terminal.
3. “>&” is used to redirect any standard output/errors to the log file “test.sh.log”.
4. “&” at the end of the line is used to make the command running in the background.
5. Check “test.sh.log” to see the status of the process.