diff --git a/docs/core/install/includes/package-manager-switcher.md b/docs/core/install/includes/package-manager-switcher.md index 8f492d1d008f0..4e4a756f3fb39 100644 --- a/docs/core/install/includes/package-manager-switcher.md +++ b/docs/core/install/includes/package-manager-switcher.md @@ -1,6 +1,7 @@ > [!div class="op_single_selector"] > +> - [Ubuntu 20.04 - x64](../linux-package-manager-ubuntu-2004.md) > - [Ubuntu 19.10 - x64](../linux-package-manager-ubuntu-1910.md) > - [Ubuntu 19.04 - x64](../linux-package-manager-ubuntu-1904.md) > - [Ubuntu 18.04 - x64](../linux-package-manager-ubuntu-1804.md) diff --git a/docs/core/install/linux-package-manager-ubuntu-1910.md b/docs/core/install/linux-package-manager-ubuntu-1910.md index 01b36cdced4ca..9cfbc7f881055 100644 --- a/docs/core/install/linux-package-manager-ubuntu-1910.md +++ b/docs/core/install/linux-package-manager-ubuntu-1910.md @@ -95,7 +95,7 @@ If that doesn't work, you can run a manual install with the following commands. ```bash sudo apt-get install -y gpg -wget O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg +wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ wget https://packages.microsoft.com/config/ubuntu/19.10/prod.list sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list diff --git a/docs/core/install/linux-package-manager-ubuntu-2004.md b/docs/core/install/linux-package-manager-ubuntu-2004.md new file mode 100644 index 0000000000000..bdb85b5445f1d --- /dev/null +++ b/docs/core/install/linux-package-manager-ubuntu-2004.md @@ -0,0 +1,111 @@ +--- +title: Install .NET Core on Ubuntu 20.04 package manager - .NET Core +description: Use a package manager to install .NET Core SDK and runtime on Ubuntu 20.04. +author: thraka +ms.author: adegeo +ms.date: 04/15/2020 +--- + +# Ubuntu 20.04 Package Manager - Install .NET Core + +[!INCLUDE [package-manager-switcher](./includes/package-manager-switcher.md)] + +This article describes how to use a package manager to install .NET Core on Ubuntu 20.04. + +[!INCLUDE [package-manager-intro-sdk-vs-runtime](includes/package-manager-intro-sdk-vs-runtime.md)] + +## Add Microsoft repository key and feed + +Before installing .NET, you'll need to: + +- Add the Microsoft package signing key to the list of trusted keys. +- Add the repository to the package manager. +- Install required dependencies. + +This only needs to be done once per machine. + +Open a terminal and run the following commands. + +```bash +wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +``` + +## Install the .NET Core SDK + +Update the products available for installation, then install the .NET Core SDK. In your terminal, run the following commands. + +```bash +sudo apt-get update +sudo apt-get install apt-transport-https +sudo apt-get update +sudo apt-get install dotnet-sdk-3.1 +``` + +> [!IMPORTANT] +> If you receive an error message similar to **Unable to locate package dotnet-sdk-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section. + +## Install the ASP.NET Core runtime + +Update the products available for installation, then install the ASP.NET Core runtime. In your terminal, run the following commands. + +```bash +sudo apt-get update +sudo apt-get install apt-transport-https +sudo apt-get update +sudo apt-get install aspnetcore-runtime-3.1 +``` + +> [!IMPORTANT] +> If you receive an error message similar to **Unable to locate package aspnetcore-runtime-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section. + +## Install the .NET Core runtime + +Update the products available for installation, then install the .NET Core runtime. In your terminal, run the following commands. + +```bash +sudo apt-get update +sudo apt-get install apt-transport-https +sudo apt-get update +sudo apt-get install dotnet-runtime-3.1 +``` + +> [!IMPORTANT] +> If you receive an error message similar to **Unable to locate package dotnet-runtime-3.1**, see the [Troubleshoot the package manager](#troubleshoot-the-package-manager) section. + +## How to install other versions + +[!INCLUDE [package-manager-switcher](./includes/package-manager-heading-hack-pkgname.md)] + +## Troubleshoot the package manager + +This section provides information on common errors you may get while using the package manager to install .NET Core. + +### Unable to locate + +If you receive an error message similar to **Unable to locate package {the .NET Core package}**, run the following commands. + +```bash +sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb +sudo apt-get update +sudo apt-get install {the .NET Core package} +``` + +If that doesn't work, you can run a manual install with the following commands. + +```bash +sudo apt-get install -y gpg +wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg +sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ +wget https://packages.microsoft.com/config/ubuntu/20.04/prod.list +sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list +sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg +sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list +sudo apt-get install -y apt-transport-https +sudo apt-get update +sudo apt-get install {the .NET Core package} +``` + +### Failed to fetch + +[!INCLUDE [package-manager-failed-to-fetch-deb](includes/package-manager-failed-to-fetch-deb.md)] diff --git a/docs/core/toc.yml b/docs/core/toc.yml index 2aafa650e1732..e12dbb1f0ece0 100644 --- a/docs/core/toc.yml +++ b/docs/core/toc.yml @@ -20,6 +20,8 @@ href: install/how-to-detect-installed-versions.md - name: Linux package managers items: + - name: Ubuntu 20.04 + href: install/linux-package-manager-ubuntu-2004.md - name: Ubuntu 19.10 href: install/linux-package-manager-ubuntu-1910.md - name: Ubuntu 19.04