ASP.NET Core can be hosted on Linux OS. There are number of low-cost hosting providers using Linux OS. In this section, we will deploy the PacktContacts web API on a Linux machine run as a virtual machine.
We will be using Ubuntu Server 14.04 LTS Linux. There are numerous articles on how to run Ubuntu on a virtual box.
To install .NET Core for Linux, go to https://www.microsoft.com/net/core#linuxubuntu. Installing Visual Studio Code will help you to write your code, if needed.
There are two ways to deploy the demo web API project on this Linux machine: either transfer the published file or run the publish command from the source code.
I find that running publish from the source code is much easier. With the source code, you can work on the Linux machine as well. Push the source code onto the Git repository and clone the Linux (Git needs to be installed...