| title | Prerequisites for .NET Core on Linux | |
|---|---|---|
| description | Supported Linux versions and .NET Core dependencies to develop, deploy, and run .NET Core applications on Linux machines. | |
| keywords | .NET, .NET Core, Linux, debian, ubuntu, RHEL, centOS, | |
| author | jralexander | |
| ms.author | johalex | |
| ms.date | 12/06/2017 | |
| ms.topic | article | |
| ms.prod | .net-core | |
| ms.devlang | dotnet | |
| ms.assetid | c33b1241-ab66-4583-9eba-52cf51146f5a | |
| ms.workload |
|
This article shows the dependencies needed to develop .NET Core applications on Linux. The supported Linux distributions/versions, and dependencies that follow apply to the two ways of developing .NET Core apps on Linux:
.NET Core 2.0 treats Linux as a single operating system. There is a single Linux build (per chip architecture) for supported Linux distros.
NET Core 2.x is supported on the following Linux 64-bit (x86_64 or amd64) distributions/versions:
- Red Hat Enterprise Linux 7
- CentOS 7
- Oracle Linux 7
- Fedora 25, Fedora 26
- Debian 8.7 or later versions
- Ubuntu 17.04, Ubuntu 16.04, Ubuntu 14.04
- Linux Mint 18, Linux Mint 17
- openSUSE 42.2 or later versions
- SUSE Enterprise Linux (SLES) 12 SP2 or later versions
See .NET Core 2.x Supported OS Versions for the complete list of .NET Core 2.x supported operating systems, out of support OS versions, and lifecycle policy links.
.NET Core 1.x is supported on the following Linux 64-bit (x86_64 or amd64) distributions/versions:
- Red Hat Enterprise Linux 7
- CentOS 7
- Oracle Linux 7
- Fedora 24
- Debian 8.2 or later versions
- Ubuntu 14.04, Ubuntu 16.04, Ubuntu 16.10*
- Ubuntu 16.10 is supported by the latest patch release of .NET Core 1.1
- Linux Mint 17
- openSUSE 42.1 or later versions (.NET Core 1.1)
See .NET Core 1.x Supported OS Versions for the complete list of .NET Core 1.x supported operating systems, out of support OS versions, and lifecycle policy links.
The following are intended to be examples. The exact versions and names may vary slightly on your Linux distribution of choice.
Ubuntu distributions require the following libraries installed:
- libunwind8
- liblttng-ust0
- libcurl3
- libssl1.0.0
- libuuid1
- libkrb5-3
- zlib1g
- libicu52 (for 14.X)
- libicu55 (for 16.X)
- libicu57 (for 17.X)
CentOS distributions require the following libraries installed:
- libunwind
- lttng-ust
- libcurl
- openssl-libs
- libuuid
- krb5-libs
- libicu
- zlib
For more information about the dependencies, see Self-contained Linux applications.
.NET Core native installers are available for supported Linux distributions/versions. The native installers require admin (sudo) access to the server. The advantage of using a native installer is that all of the .NET Core native dependencies are installed. Native installers also install the .NET Core SDK system-wide.
On Linux, there are two installer package choices:
- Using a feed-based package manager, such as apt-get for Ubuntu, or yum for CentOS/RHEL.
- Using the packages themselves, DEB or RPM.
The dotnet-install scripts are used to perform a non-admin install of the CLI toolchain and the shared runtime. You can download the script from: https://dot.net/v1/dotnet-install.sh
The installer bash script is used in automation scenarios and non-admin installations. This script also reads PowerShell switches, so they can be used with the script on Linux/OS X systems.
Important
Before running the script, install the required dependencies.
To install .NET Core on RHEL 7:
-
Enable the Red Hat .NET channel, available under your RHEL 7 subscription.
-
For Red Hat Enterprise 7 Server, use:
subscription-manager repos --enable=rhel-7-server-dotnet-rpms
-
For Red Hat Enterprise 7 Workstation, use:
subscription-manager repos --enable=rhel-7-workstation-dotnet-rpms
-
For Red Hat Enterprise 7 HPC Compute Node, use:
subscription-manager repos --enable=rhel-7-hpc-node-dotnet-rpms
-
-
Install the scl tool.
yum install scl-utils
-
Install .NET Core
Install .NET Core 2.0 SDK and Runtime:
yum install rh-dotnet20Enable .NET Core 2.0 SDK/Runtime for your environment:
scl enable rh-dotnet20 bash.NET Core 1.1
Install .NET Core 1.1 SDK and Runtime:
yum install rh-dotnetcore11Enable .NET Core 1.1 SDK and Runtime for your environment:
scl enable rh-dotnetcore11 bash.NET Core 1.0
Install .NET Core 1.0 SDK and Runtime:
yum install rh-dotnetcore10Enable .NET Core 1.0 SDK and Runtime for your environment:
scl enable rh-dotnetcore10 bash-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
For Red Hat .NET channel access registration help, see Chapter 1 of the .NET Core 1.1 Getting Started Guide at Red Hat.
Install .NET Core for Ubuntu 14.04, Ubuntu 16.04, Ubuntu 16.10 & Linux Mint 17, Linux Mint 18 (64 bit)
- Remove any previous preview versions of .NET Core from your system.
-
Register the Microsoft Product key as trusted.
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
-
Set up the desired version host package feed.
Ubuntu 17.10
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-get updateUbuntu 17.04
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-zesty-prod zesty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-get updateUbuntu 16.04 / Linux Mint 18
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' sudo apt-get updateUbuntu 14.04 / Linux Mint 17
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-get update -
Install .NET Core.
sudo apt-get install dotnet-sdk-2.1.4
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
- Set up the desired version host package feed.
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 B02C46DF417A0893
sudo apt-get updateUbuntu 16.04 / Linux Mint 18
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 B02C46DF417A0893
sudo apt-get updateUbuntu 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 B02C46DF417A0893
sudo apt-get update-
Install .NET Core 1.x on Ubuntu or Linux Mint:
sudo apt-get install dotnet-dev-1.0.4
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
To install .NET Core on Debian 8 or Debian 9 (64 bit):
- Remove any previous preview versions of .NET Core from your system.
Note
A user-controlled directory is required for Linux system installs from tar.gz.
-
Install system components.
sudo apt-get update sudo apt-get install curl libunwind8 gettext apt-transport-https
-
Register the trusted Microsoft Product key.
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
-
Register the Microsoft Product feed.
Debian 9 (Stretch)
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/dotnetdev.list'Debian 8 (Jessie)
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main" > /etc/apt/sources.list.d/dotnetdev.list' -
Install .NET Core SDK.
sudo apt-get update sudo apt-get install dotnet-sdk-2.0.0
-
Add dotnet to your PATH.
export PATH=$PATH:$HOME/dotnet
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
-
Get the prerequisites.
sudo apt-get install curl libunwind8 gettext
-
Download the .NET Core SDK binaries (tarball).
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=848826 -
Extract the .NET Core SDK binaries.
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet -
Add dotnet to your PATH.
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
To install .NET Core 2.x on Fedora 26 or Fedora 25, or .NET Core 1.x on Fedora 24:
- Remove any previous preview versions of .NET Core from your system.
Note
A user-controlled directory is required for Linux system installs from tar.gz.
Fedora 26 or Fedora 25
-
Register the Microsoft signature key.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
-
Add the dotnet product feed.
sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/dotnetdev.repo' -
Install the .NET Core SDK.
sudo dnf update sudo dnf install libunwind libicu sudo dnf install dotnet-sdk-2.0.0
-
Add dotnet to your PATH.
export PATH=$PATH:$HOME/dotnet
Fedora 24
-
Get the prerequisites.
sudo dnf install libunwind libicu
-
Download the .NET Core SDK binary (tarball).
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=848833 -
Extract the .NET Core SDK binaries.
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet -
Add dotnet to your PATH.
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
To install .NET Core for CentOS 7.1 (64 bit) & Oracle Linux 7.1 (64 bit):
- Remove any previous preview versions of .NET Core from your system.
Note
A user-controlled directory is required for Linux system installs from tar.gz.
-
Register the Microsoft signature key.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
-
Add the Microsoft Product feed.
sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/dotnetdev.repo' -
Install the .NET Core SDK.
sudo yum update sudo yum install libunwind libicu sudo yum install dotnet-sdk-2.0.0
-
Add dotnet to your PATH
export PATH=$PATH:$HOME/dotnet
-
Get the prerequisites.
sudo yum install libunwind libicu
-
Download the .NET Core SDK binary (tarball).
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=848821 -
Extract the .NET Core SDK binaries.
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet -
Add dotnet to your PATH.
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
To install .NET Core 2.x for SUSE Linux Enterprise Server (SLES) 12 SP2 (64 bit):
-
Remove any previous preview versions of .NET Core from your system.
-
Add the dotnet product feed.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/dotnetdev.repo' -
Install the .NET Core SDK.
sudo zypper update sudo zypper install libunwind libicu sudo zypper install dotnet-sdk-2.0.0
-
Add dotnet to your PATH.
export PATH=$PATH:$HOME/dotnet
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
To install .NET Core 2.x for openSUSE or .NET Core 1.x for openSUSE (64 bit):
- Remove any previous preview versions of .NET Core from your system.
Note
A user-controlled directory is required for Linux system installs from tar.gz.
-
Register the Microsoft signature key.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
-
Add the dotnet product feed.
sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/dotnetdev.repo' -
Install the .NET Core SDK.
sudo zypper update sudo zypper install libunwind libicu sudo zypper install dotnet-sdk-2.0.0
-
Add dotnet to your PATH.
export PATH=$PATH:$HOME/dotnet
-
Get the prerequisites.
sudo zypper install libunwind libicu
-
Download the .NET Core SDK binary (tarball).
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=848824 -
Extract the .NET Core SDK binaries.
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet -
Add dotnet to your PATH.
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
-
Run the
dotnet --versioncommand to prove the installation succeeded.dotnet --version
Important
If you have problems with the .NET Core 2.x installation on a supported Linux distribution/version, consult the 2.0 Known issues topic for your installed distributions/versions.
If you have problems with the .NET Core 1.x installation on a supported Linux distribution/version, consult the 1.0.0 Known Issues and 1.0.1 Known Issues topics for your installed distributions/versions.