Popular blog tags

How to Install and uninstall reinstall  upgrade .NET x on Ubuntu 18.04*64 step by step(vultr)

Published

In this post we will be installing Microsoft .net  SDK  on Ubuntu Linux and create high performance HTTP end-point in C# on which you can build a micro-service (or anything else).

Ubuntu 18.04.6 LTS

# lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic

 

 

 

Install first or Upgrade net 7.x on Ubuntu 18.04*64 -test ok on vultr(success)

step 1:Open a terminal and run the following commands:

wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

step 2:Install the SDK

sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-7.0

source:https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-1804

 

 

Install first or Upgrade net 6.x on Ubuntu 18.04*64 -test ok on vultr

 

Offcial Doc detail:https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#1804-

 

step 1: check that .NETx version is already installed

dotnet --info

 

output

.NET SDK (reflecting any global.json):
 Version:   5.0.101
 Commit:    d05174dc5a

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.101/

Host (useful for support):
  Version: 5.0.1
  Commit:  b02e13abab

.NET SDKs installed:
  3.0.100 [/usr/share/dotnet/sdk]
  3.1.301 [/usr/share/dotnet/sdk]
  5.0.100 [/usr/share/dotnet/sdk]
  5.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

 

step 2:Install the SDK&Install the runtime

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-6.0

output

 Setting up dotnet-hostfxr-6.0 (6.0.0-1) ...
Setting up dotnet-runtime-6.0 (6.0.0-1) ...
Setting up aspnetcore-runtime-6.0 (6.0.0-1) ...
Setting up dotnet-sdk-6.0 (6.0.100-1) ...

https://docs.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#manual-install

Other

https://github.com/dotnet/core/blob/main/release-notes/6.0/install-linux.md

 

os:Ubuntu 18.04*64

.net Sdk version:.net 6.0

.NET 6.0 download url:https://dotnet.microsoft.com/download/dotnet/6.0

                                      https://aka.ms/dotnet-download

You can download .NET 6.0, for Windows, macOS, and Linux, for x86, x64, Arm32, Arm64.