Complete the code to run a command that keeps running after logout using nohup.
nohup [1] &The nohup command runs sleep 60 so it continues even after logout.
Complete the code to redirect nohup output to a file named output.log.
nohup sleep 60 [1] output.log &
>> appends instead of overwriting.< is for input redirection.The > operator redirects standard output to output.log, overwriting it.
Fix the error in the command to run a script persistently with nohup.
nohup [1] script.sh &Use bash to run the script file with nohup. Other options are not valid commands.
Fill both blanks to run a Python script persistently and redirect both output and errors to log.txt.
nohup python3 [1] [2] log.txt &
< instead of output.Use script.py as the script name and 2>&1 to redirect stderr to stdout, which is redirected to log.txt. The full command should be nohup python3 script.py > log.txt 2>&1 &.
Fill all three blanks to run a long command persistently, redirect output and errors to nohup.out, and run in background.
nohup [1] [2] nohup.out [3] &
< instead of output.Use long_running_command as the command, > to redirect output, and 2>&1 to redirect errors to the same file.