This article mainly introduces the steps to deploy the. NET core environment under Linux, gives a detailed introduction, I believe that everyone's study or work has a certain reference value, the need for friends to see together below.
Note: installing a. NET core environment on Linux requires a 64-bit system
The installation deployment is as follows:
1. Add dotnet Source to Apt-get
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 hkp://keyserver.ubuntu.com:80--recv-keys 417A0893sudo 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 hkp://keyserver.ubuntu.com:80--recv-keys 417A0893sudo Apt-get Update
Ubuntu 16.10
sudo sh-c ' echo ' Deb [ARCH=AMD64] https://apt-mo.trafficmanager.net/repos/dotnet-release/yakkety main ">/etc/apt/ Sources.list.d/dotnetdev.list ' sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv-keys 417A0893sudo Apt-get Update
2. Install the. NET Core SDK
The current version of the SDK has the following address:
Official address: Https://www.microsoft.com/net/download/linux
This underground load: http://www.jb51.net/softs/472366.html
sudo apt-get install dotnet-dev-1.0.1
3. Generate Sample Code
After the SDK is installed, generate a sample code to see if the installation was successful
dotnet New Console-o hwappcd Hwapp
4. Execute the sample code to see the results
dotnet Restoredotnet Run
If you do, see the familiar "Hello world" to indicate that you have successfully installed.