Assume that I am connected via SSH on a remote Ubuntu system. I want to execute a script there using
nohup
in case of potential connection drops and redirecting its log to a file. The command I run is
nohup bash myscript.sh > log.txt &
Then, the terminal prints the PID of the script and the message:
> nohup ignoring input and redirecting stderr to stdout
The cursor freezes there and I am not able to execute other commands unless I exit the SSH session with Ctrl + D and relogin. I would prefer the SSH session to remain open and proceed to the next terminal prompt without the need to relogin. Is there any way to achieve this?
Asked by mgus
(259 rep)
Aug 20, 2020, 05:57 AM
Last activity: Nov 28, 2023, 04:19 AM
Last activity: Nov 28, 2023, 04:19 AM