Reputation: 238
I built an ASP.NET core application, running on Azure Linux VM.
I managed to get start the application by login in (via SSH) to the VM and using the dotnet run
command.
The problem is that the asp.net application getting shut down once i close log out (close the SSH).
How do you keep the application running even if the SSH is closed?
Upvotes: 1
Views: 63
Reputation: 19205
You could add &
to the end of your command. The &
makes the command run in the background. Even you close your ssh session, your application is also running.
Answer: Using sudo nohup dotnet run &
worked.
From man bash
If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0.
Upvotes: 2