- Open your favorite browser, type the following URL, and press Enter:
https://www.microsoft.com/net/download/linux
- Select the Install .NET Core SDK 2.x Package button.
- From the Linux Distribution drop-down list, select Ubuntu 16.04.
- Follow the instructions on the page to install the current SDK or perform the following steps to install.
- Now open the terminal, type the following command, and press Enter:
$ curl https://packages.microsoft.com/keys/microsoft.asc |
gpg --dearmor > microsoft.gpg
- If you have a fresh installation of Ubuntu you might not have curl installed. If not use the following command to install curl:
$ sudo apt-get install curl
- Now, again in the terminal type the following command and press Enter to get the list of files:
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
- Type the following command and press Enter in the terminal:
$ sudo sh -c 'echo "deb [arch=amd64]
https://packages.microsoft.com/repos/
microsoft-ubuntu-xenial-prod xenial main" >
/etc/apt/sources.list.d/dotnetdev.list'
- Let's update the package list using this command:
$ sudo apt-get update
- Finally, let's install the SDK using this command:
$ sudo apt-get install dotnet-sdk-2.0.2
- Now we are done with installing the SDK, let's test it using the following command:
$ dotnet --version
- If it's all OK, you should get the following output:
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.