Using the nohup command
The nohup
command in Ubuntu is used to run a command or a script in the background, even if the user logs out. The name “nohup” stands for “no hang up,” which refers to the practice of disconnecting a process from the terminal.
Example
# Example how to execute the command
nohup ./script.sh &
# Lot output in the file
nohup ./script.sh > output.log &
Monitor “nohup” command:
ps aux | grep "script.sh"