.NET Core Install for Ubuntu 14.04
-
Add the dotnet apt-get feed
In order to install .NET Core on Ubuntu or Linux Mint, you need to first set up the apt-get feed that hosts the package you need.
Ubuntu 14.04 / Linux Mint 17
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
- sudo apt-get update
Ubuntu 16.04
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
- sudo apt-get update
-
2
Install .NET Core SDK
Before you start, please remove any previous versions of .NET Core from your system by using this script.
To .NET Core on Ubuntu or Linux Mint, simply use apt-get.
- sudo apt-get install dotnet-dev-1.0.0-preview2-003131
-
3
Initialize some code
Let's initialize a sample Hello World application!
- mkdir hwapp
- cd hwapp
- dotnet new
-
4
Run the app
The first command will restore the packages specified in the project.json file, and the second command will run the actual sample:
ps:https://www.microsoft.com/net/core#ubuntu