nohup
nohup runs background processes uninterruptedly even the remote SSH session goes offline.
You can also lower the priority for the background process
Output¶
The output will be in nohup.out
by default. If you want to customize the output location, just redirect it:
To monitor what is going on in nohup.out
End the running process¶
You can kill the ongoing process by the process ID (PID).
Run a background process with sudo and nohup¶
Use sudo -b CMD
Limit the size of nohup.out¶
Use logrotate. Configure something like this in /etc/logrotate.conf