Step 1: Install .Net Core on Ubuntu using this link
Step 2: On Terminal (Cntrl + Alt + T), go to /home/ directory. Create dir. i.e.: mkdir coredemo If you are new to ubuntu: /home/ directory is place where it is good to store user specific stuff.
Step 3: If you are creating
Asp.net Core web application, run command: dotnet web
Asp.net web api, run command: dotnet api
Step 4: dotnet restore
Step 5: dotnet run
- Asp.net Core Web application, type in browser: http://localhost:5000
- Asp.net Web Api application, type in browser: http://localhost:5000/api/values
(Note: It is possible that port might be different for you, if that is the case change accordingly)
Things to note: Above approach is using kestrel as web server. In next post, I will explain how to host both web and api on nginx server.