Skip to content
Advertisement

How to run DNX ‘console app’ as a background service on Linux?

I’ve implemented a DNX (dnx451) ‘console app’ which is intended to run as a background service. On Windows I would just turn it into a Windows Service. What is the proper way to do this on Linux (for instance, Ubuntu)?

EDIT:

Found more info here: How to migrate a .NET Windows Service application to Linux using mono?

Advertisement

Answer

On Unix/Linux operating system you can turn any program into a background service like

dnx run &

The “&” turns the “dnx run” it into a background program (when I remember right for your current shell session). For real background services look at the startup scripts of common Unix daemons like mysql or apache httpd. They get started by the initd/systemd processes and then execute on their own.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement