Ubuntu - Installing .net core

Solution 1:

UPDATED see at the end. (thanks to Prasanna)

.NET core now supports Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17.

Please check the official page for all the details.

Today (May 2016) only Ubuntu 14.04 is supported.

I successfully install it on Ubuntu 15.10 by adding

deb http://security.ubuntu.com/ubuntu trusty-security main

to /etc/apt/sources-list

Once it's done you should do:

apt-get update

apt-get upgrade

and again the command

apt-get install dotnet-dev-1.0.0-preview1-002702a

It will ask to install extra package; you reply yes and you are done!

Test by typing

dotnet --version

Enjoy!

UPDATED

Solution 2:

Now .NET core supports ubuntu 16.04.

Please check link for more details

https://www.microsoft.com/net/core#linuxubuntu

You need to setup the apt-feed first for ubuntu 16.04.

Remove previous .net core versions from your system if any

Then install .net core sdk

Solution 3:

September 2018 - .NET Core installation is super simple on Ubuntu:

Register the Microsoft key, product repository, and install required dependencies:

IMPORTANT NOTE: change the 18.04 in the below path to your Ubuntu version (i.e.: 17.10, 16.04 etc.)

wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Now update list of available packages and install your SDK

sudo apt-get update
sudo apt-get install dotnet-sdk-2.1

Done!

Additional info:

For me (end of Sep 2018) it was version 2.1, but you can check for more recent versions like this:

sudo apt-cache search dotnet-sdk

Also please NOTE: Microsoft on their official page (here) recommend use sudo apt-get install apt-transport-https before installing dotnet-sdk-your_version. This is not required anymore because (from package description):

Description-en: transitional package for https support This is a dummy transitional package - https support has been moved into the apt package in 1.5. It can be safely removed.

So feel free to skip this.