Prerequisites for .NET Core on Linux

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:

Note

The .NET Core SDK package is not required for production servers/environments. Only the .NET Core runtime package is needed for apps deployed to production environments. The .NET Core runtime is deployed with apps as part of a self-contained deployment, however, it must be deployed for Framework-dependent deployed apps separately. For more information about framework-dependent and self-contained deployment types, see .NET Core application deployment. Also see Self-contained Linux applications for specific guidelines.

Supported Linux versions

.NET Core 2.x treats Linux as a single operating system. There is a single Linux build (per chip architecture) for supported Linux distributions.

NET Core 2.1

NET Core 2.1 is supported on the following Linux 64-bit (x86_64 or amd64) distributions/versions:

  • Red Hat Enterprise Linux 7, 6
  • CentOS 7
  • Oracle Linux 7
  • Fedora 27
  • Debian 9, 8.7 or later versions
  • Ubuntu 18.04, 17.10, 16.04, 14.04
  • Linux Mint 18, 17
  • openSUSE 42.3 or later versions
  • SUSE Enterprise Linux (SLES) 12 Service Pack 2 or later
  • Alpine Linux 3.7 or later versions

See .NET Core 2.0 Supported OS Versions for the complete list of .NET Core 2.0 supported operating systems, distributions and versions, out of support OS versions, and lifecycle policy links.

NET Core 2.0

NET Core 2.0 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 27
  • Debian 9, 8.7 or later versions
  • Ubuntu 18.04, 17.10, 16.04, 14.04
  • Linux Mint 18, 17
  • openSUSE 42.3 or later versions
  • SUSE Enterprise Linux (SLES) 12 Service Pack 2 or later

See .NET Core 2.0 Supported OS Versions for the complete list of .NET Core 2.0 supported operating systems, distributions and versions, out of support OS versions, and lifecycle policy links.

Linux distribution dependencies

The following are intended to be examples. The exact versions and names may vary slightly on your Linux distribution of choice.

Ubuntu

Ubuntu distributions require the following libraries installed:

  • liblttng-ust0
  • libcurl3
  • libssl1.0.0
  • libkrb5-3
  • zlib1g
  • libicu52 (for 14.x)
  • libicu55 (for 16.x)
  • libicu57 (for 17.x)
  • libicu60 (for 18.x)

For versions earlier than .NET Core 2.1, following dependencies are also required:

  • libunwind8
  • libuuid1

CentOS

CentOS distributions require the following libraries installed:

  • lttng-ust
  • libcurl
  • openssl-libs
  • krb5-libs
  • libicu
  • zlib

For versions earlier than .NET Core 2.1, following dependencies are also required:

  • libunwind
  • libuuid

For more information about the dependencies, see Self-contained Linux applications.

Installing .NET Core dependencies with the native installers

.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.

Scripting Installs with the .NET Core installer script

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.

Install .NET Core for supported Red Hat Enterprise Linux (RHEL) versions

To install .NET Core on supported RHEL versions:

.NET Core 2.0

Install .NET Core 2.0 on supported RHEL versions:

Install .NET Core for supported Ubuntu and Linux Mint distributions/versions (64 bit)

  1. Remove any previous preview versions of .NET Core from your system.

  2. Install .NET Core 2.x on supported Ubuntu and Linux Mint distributions/versions (64 bit):

.NET Core 2.0

Runtimes / SDKs Ubuntu 18.04 Ubuntu 17.10 Ubuntu 16.04 / Linux Mint 18 Ubuntu 14.04 / Linux Mint 17
.NET Core Runtime 2.0.8 Install link Install link Install link Install link
.NET Core Runtime 2.0.7 Install link Install link Install link Install link
.NET Core Runtime 2.0.6 Install link Install link Install link Install link
.NET Core Runtime 2.0.5 Install link Install link Install link Install link
.NET Core SDK 2.1.200 Install link Install link Install link Install link
.NET Core SDK 2.1.105 Install link Install link Install link Install link
.NET Core SDK 2.1.103 Install link Install link Install link Install link
.NET Core SDK 2.0.3 Install link Install link Install link Install link
.NET Core SDK 2.0.0 Install link Install link Install link Install link

.NET Core 2.1

Important

To use .NET Core 2.1 with Visual Studio, you need to install Visual Studio 2017 15.7 Preview 1 or newer.

Runtimes / SDKs Ubuntu 18.04 Ubuntu 17.10 Ubuntu 16.04 / Linux Mint 18 Ubuntu 14.04 / Linux Mint 17
.NET Core Runtime 2.1.0 Install link Install link Install link Install link
.NET Core SDK 2.1.300 Install link Install link Install link Install link

Install .NET Core for supported Debian versions (64 bit)

To install .NET Core on supported Debian versions (64 bit):

Note

A user-controlled directory is required for Linux system installs from tar.gz.

  1. Remove any previous preview versions of .NET Core from your system.

  2. Install .NET Core 2.x on supported Debian versions (64 bit):

.NET Core 2.0

Runtimes / SDKs Debian 9 Debian 8
.NET Core Runtime 2.0.8 Install link Install link
.NET Core Runtime 2.0.7 Install link Install link
.NET Core Runtime 2.0.6 Install link Install link
.NET Core Runtime 2.0.5 Install link Install link
.NET Core SDK 2.1.200 Install link Install link
.NET Core SDK 2.1.105 Install link Install link
.NET Core SDK 2.1.103 Install link Install link
.NET Core SDK 2.0.3 Install link Install link
.NET Core SDK 2.0.0 Install link Install link

.NET Core 2.1

Important

To use .NET Core 2.1 with Visual Studio, you need to install Visual Studio 2017 15.7 Preview 1 or newer.

Runtimes / SDKs Debian 9 Debian 8
.NET Core Runtime 2.1.0 Install link Install link
.NET Core SDK 2.1.300 Install link Install link

Install .NET Core for supported Fedora versions (64 bit)

To install .NET Core on supported Fedora versions:

Note

A user-controlled directory is required for Linux system installs from tar.gz.

  1. Remove any previous preview versions of .NET Core from your system.

  2. Install .NET Core 2.x on supported Fedora versions (64 bit):

.NET Core 2.0

Runtimes / SDKs Fedora 26 or later Fedora 25 or previous
.NET Core Runtime 2.0.8 Install link Install link
.NET Core Runtime 2.0.7 Install link Install link
.NET Core Runtime 2.0.6 Install link Install link
.NET Core Runtime 2.0.5 Install link Install link
.NET Core SDK 2.1.200 Install link Install link
.NET Core SDK 2.1.105 Install link Install link
.NET Core SDK 2.1.103 Install link Install link
.NET Core SDK 2.0.3 Install link Install link

.NET Core 2.1

Important

To use .NET Core 2.1 with Visual Studio, you need to install Visual Studio 2017 15.7 Preview 1 or newer.

Runtimes / SDKs Fedora 27 Fedora 26
.NET Core Runtime 2.1.0 Install link Install link
.NET Core SDK 2.1.300 Install link Install link

Install .NET Core for supported CentOS and Oracle Linux distributions/versions (64 bit)

To install .NET Core for supported CentOS and Oracle Linux distributions/versions (64 bit):

Note

A user-controlled directory is required for Linux system installs from tar.gz.

  1. Remove any previous preview versions of .NET Core from your system.

  2. Install .NET Core 2.x on supported CentOS and Oracle Linux distributions/versions (64 bit):

.NET Core 2.0

.NET Core 2.1

Important

To use .NET Core 2.1 with Visual Studio, you need to install Visual Studio 2017 15.7 Preview 1 or newer.

Install .NET Core for supported SUSE Linux Enterprise Server and OpenSUSE distributions/versions (64 bit)

To install .NET Core 2.x for supported SUSE Linux Enterprise Server and OpenSUSE distributions/versions (64 bit):

  1. Remove any previous preview versions of .NET Core from your system.

  2. Install .NET Core 2.x on supported SUSE Linux Enterprise Server and OpenSUSE distributions/versions (64 bit):

.NET Core 2.0

SUSE Linux Enterprise Server

openSUSE

.NET Core 2.1

Important

To use .NET Core 2.1 with Visual Studio, you need to install Visual Studio 2017 15.7 Preview 1 or newer.

SUSE Linux Enterprise Server

openSUSE

Install .NET Core for supported Alpine Linux versions (64 bit)

Note

A user-controlled directory is required for Linux system installs from tar.gz.

Download and follow the .NET Core 2.1 installation instructions for supported Alpine Linux versions (64 bit) at the following links:

Important

If you have problems with a .NET Core installation on a supported Linux distribution/version, consult the following topics for your installed distributions/versions: