Dot net core linux

Install the .NET SDK or the .NET Runtime manually

.NET is supported on Linux and this article describes how to install .NET on Linux using the install script or by extracting the binaries. For a list of distributions that support the built-in package manager, see Install .NET on Linux.

You can also install .NET with snap. For more information, see Install the .NET SDK or the .NET Runtime with Snap.

Install the SDK (which includes the runtime) if you want to develop .NET apps. Or, if you only need to run apps, install the Runtime. If you’re installing the Runtime, we suggest you install the ASP.NET Core Runtime as it includes both .NET and ASP.NET Core runtimes.

If you’ve already installed the SDK or Runtime, use the dotnet —list-sdks and dotnet —list-runtimes commands to see which versions are installed. For more information, see How to check that .NET is already installed.

.NET releases

The following table lists the .NET (and .NET Core) releases:

вњ”пёЏ Supported вќЊ Unsupported
5.0 3.0
3.1 (LTS) 2.2
2.1 (LTS) 2.0
1.1
1.0

For more information about the life cycle of .NET releases, see .NET Core and .NET 5 Support Policy.

Dependencies

It’s possible that when you install .NET, specific dependencies may not be installed, such as when manually installing. The following list details Linux distributions that are supported by Microsoft and have dependencies you may need to install. Check the distribution page for more information:

For generic information about the dependencies, see Self-contained Linux apps.

RPM dependencies

If your distribution wasn’t previously listed, and is RPM-based, you may need the following dependencies:

If the target runtime environment’s OpenSSL version is 1.1 or newer, you’ll need to install compat-openssl10.

DEB dependencies

If your distribution wasn’t previously listed, and is debian-based, you may need the following dependencies:

Common dependencies

For .NET apps that use the System.Drawing.Common assembly, you’ll also need the following dependency:

You can install a recent version of libgdiplus by adding the Mono repository to your system. For more information, see https://www.mono-project.com/download/stable/.

Scripted install

The dotnet-install scripts are used for automation and non-admin installs of the SDK and Runtime. You can download the script from https://dot.net/v1/dotnet-install.sh.

![IMPORTANT] Bash is required to run the script.

The script defaults to installing the latest SDK long term support (LTS) version, which is .NET Core 3.1. To install the current release, which may not be an (LTS) version, use the -c Current parameter.

To install .NET Runtime instead of the SDK, use the —runtime parameter.

You can install a specific version by altering the -c parameter to indicate the specific version. The following command installs .NET SDK 5.0.

Manual install

As an alternative to the package managers, you can download and manually install the SDK and runtime. Manual installation is commonly used as part of continuous integration testing or on an unsupported Linux distribution. For a developer or user, it’s better to use a package manager.

First, download a binary release for either the SDK or the runtime from one of the following sites. If you install the .NET SDK, you will not need to install the corresponding runtime:

Next, extract the downloaded file and use the export command to set DOTNET_ROOT to the extracted folder’s location and then ensure .NET is in PATH. This should make the .NET CLI commands available at the terminal.

Alternatively, after downloading the .NET binary, the following commands may be run from the directory where the file is saved to extract the runtime. This will also make the .NET CLI commands available at the terminal and set the required environment variables. Remember to change the DOTNET_FILE value to the name of the downloaded binary:

The preceding export commands only make the .NET CLI commands available for the terminal session in which it was run.

You can edit your shell profile to permanently add the commands. There are a number of different shells available for Linux and each has a different profile. For example:

    Bash Shell:

/.bashrc
Korn Shell:

/.kshrc or .profile
Z Shell:

Edit the appropriate source file for your shell and add :$HOME/dotnet to the end of the existing PATH statement. If no PATH statement is included, add a new line with export PATH=$PATH:$HOME/dotnet .

Also, add export DOTNET_ROOT=$HOME/dotnet to the end of the file.

This approach lets you install different versions into separate locations and choose explicitly which one to use by which application.

Источник

Install .NET on Linux

.NET is available on different Linux distributions. Most Linux platforms and distributions have a major release each year, and most provide a package manager that is used to install .NET. This article describes what is currently supported and which package manager is used.

The rest of this article is a breakdown of each major Linux distribution that .NET supports. All .NET releases remain supported until either the version of .NET reaches end-of-support or the Linux distribution reaches end-of-life.

For the best compatibility, choose a long-term release (LTS) version.

Unsupported releases

The following versions of .NET are вќЊ no longer supported. The downloads for these still remain published:

These unsupported versions aren’t detailed in the sections below and your mileage may vary if you try to install them.

Manual installation

If you don’t want to use a package manager to install .NET on Linux, you can install .NET in one of the following ways:

Be sure to check the appropriate distribution page for more information about any required dependencies that may be missing when you do a manual installation.

Install preview versions

Preview and Release Candidate versions of .NET aren’t available in package managers. You can install previews and release candidates of .NET manually.

Alpine

The following table is a list of currently supported .NET releases and the versions of Alpine they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Alpine reaches end-of-life.

  • A вњ”пёЏ indicates that the version of Alpine or .NET is still supported.
  • A вќЊ indicates that the version of Alpine or .NET isn’t supported on that Alpine release.
  • When both a version of Alpine and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
Alpine .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 3.13 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 3.12 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 3.11 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 3.10 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 3.9 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 3.8 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0

CentOS

CentOS 7 uses Yum as a package manager and CentOS 8 uses DNF.

The following table is a list of currently supported .NET releases on both CentOS 7 and CentOS 8. These versions remain supported until either the version of .NET reaches end-of-support or the version of CentOS is no longer supported.

CentOS .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 8 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 7 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

Debian

Debian uses APT (Advanced Package Tool) as a package manager.

The following table is a list of currently supported .NET releases and the versions of Debian they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Debian reaches end-of-life.

  • A вњ”пёЏ indicates that the version of Debian or .NET is still supported.
  • A вќЊ indicates that the version of Debian or .NET isn’t supported on that Debian release.
  • When both a version of Debian and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
Debian .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 11 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 10 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 9 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вќЊ 8 вњ”пёЏ 2.1 вќЊ 3.1 вќЊ 5.0

Fedora

Fedora uses DNF as its package manager.

The following table is a list of currently supported .NET releases and the versions of Fedora they’re supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Fedora reaches end-of-life.

  • A вњ”пёЏ indicates that the version of Fedora or .NET is still supported.
  • A вќЊ indicates that the version of Fedora or .NET isn’t supported on that Fedora release.
  • When both a version of Fedora and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
Fedora .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 34 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 33 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 32 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вќЊ 31 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 30 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 29 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вќЊ 5.0
вќЊ 28 вњ”пёЏ 2.1 вќЊ 3.1 вќЊ 5.0
вќЊ 27 вњ”пёЏ 2.1 вќЊ 3.1 вќЊ 5.0

openSUSE

openSUSE uses zypper as the package manager.

The following table is a list of currently supported .NET releases on openSUSE 15. These versions remain supported until either the version of .NET reaches end-of-support or the version of openSUSE is no longer supported.

openSUSE .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 15 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

Red Hat

Red Hat Enterprise Linux (RHEL) uses yum (RHEL 7) and DNF (RHEL 8) as the package manager.

The following table is a list of currently supported .NET releases on both RHEL 7 and RHEL 8. These versions remain supported until either the version of .NET reaches end-of-support or the version of RHEL is no longer supported.

  • A вњ”пёЏ indicates that the version of RHEL or .NET is still supported.
  • A вќЊ indicates that the version of RHEL or .NET isn’t supported on that RHEL release.
  • When both a version of RHEL and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
RHEL .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 8 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 7 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

For more information, see Install .NET on RHEL.

SLES uses zypper as the package manager.

The following table is a list of currently supported .NET releases on both SLES 12 SP2 and SLES 15. These versions remain supported until either the version of .NET reaches end-of-support or the version of SLES is no longer supported.

  • A вњ”пёЏ indicates that the version of SLES or .NET is still supported.
  • A вќЊ indicates that the version of SLES or .NET isn’t supported on that SLES release.
  • When both a version of SLES and a version of .NET have вњ”пёЏ, that OS and .NET combination is supported.
SLES .NET Core 2.1 .NET Core 3.1 .NET 5.0
вњ”пёЏ 15 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0
вњ”пёЏ 12 SP2 вњ”пёЏ 2.1 вњ”пёЏ 3.1 вњ”пёЏ 5.0

For more information, see Install .NET on SLES.

Ubuntu

Ubuntu uses APT (Advanced Package Tool) as a package manager.

The following table represents the support status of Ubuntu and .NET.

Источник

Download .NET

Downloads for .NET and .NET Core, including ASP.NET Core

Not sure where to start? See the Hello World in 5 minutes tutorial to install .NET and build your first app.

.NET is a free, cross-platform, open-source developer platform for building many different types of applications.

Current Current is the most recent stable release, with the latest features and bug fixes. We recommend using this release.

.NET Core 3.1

LTS Long-term support (LTS) releases have an extended support period. Use LTS if you need to stay supported on the same version of .NET or .NET Core for longer.

.NET is a free, cross-platform, open-source developer platform for building many different types of applications.

Current Current is the most recent stable release, with the latest features and bug fixes. We recommend using this release.

.NET Core 3.1

LTS Long-term support (LTS) releases have an extended support period. Use LTS if you need to stay supported on the same version of .NET or .NET Core for longer.

.NET is a free, cross-platform, open-source developer platform for building many different types of applications.

Current Current is the most recent stable release, with the latest features and bug fixes. We recommend using this release.

.NET Core 3.1

LTS Long-term support (LTS) releases have an extended support period. Use LTS if you need to stay supported on the same version of .NET or .NET Core for longer.

.NET is a free, cross-platform, open-source developer platform for building many different types of applications.

.NET Core

Free. Cross-platform. Open source. Supported.

.NET is free. There are no fees or licensing costs, including for commercial use.

.NET is open-source and cross-platform, with free development tools for macOS, Windows, and Linux.

.NET is supported by Microsoft. Microsoft ships official releases that are built and tested on Microsoft-maintained servers in Azure and supported just like any Microsoft product.

Thank You to All the Contributors

.NET is open source and we are very thankful for the many contributions it receives from the community.

Ready to Get Started?

Our step-by-step tutorial will help you get .NET running on your computer.

Источник

Читайте также:  Как форматировать диск mac and windows
Оцените статью