The .NET Core is a free and open-source software framework designed with keeping Linux and macOS in mind. It is a cross-platform successor to .NET Framework available for Linux, macOS and Windows systems. .NET Core framework already provides scaffolding tools for bootstrapping projects.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Open Source Software Installation queries.
In this context, we shall look into how to install the .Net 5 SDK and runtime on a Debian 10 Linux machine.
Main features of .NET Core includes:
- Flexibility in use: It can be used as an extension in your desired application. Or to be installed in your service completely separately and with different uses.
- Cross-Platform capability: Ability to install on Windows, Linux and macOS; Ability to port to other OS. Support for other operating systems, CPUs and applications will grow and improve over time, according to Microsoft and other companies, designers and developers involved.
- Command-line tools: All products derived from different scenarios can be used and edited and executed as a command line.
- Compatibility: Thanks to the use of the standard .Net Core library, Net is compatible with the Net Framework, .Xamarin and Mono.
- Open source: The .Net Core platform is fully open source and uses MIT and Apache 2 licenses.
Steps to follow for Installing .Net 5 on Debian 10
1. Get repositories
To begin, we need to fetch repositories from Microsoft's servers. So, Run the following commands in your terminal:
$ wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
$ rm packages-microsoft-prod.deb
2. Install the .Net SDK v5
Now you would need to install the SDK to develop your .NET applications locally by running the below commands:
$ sudo apt-get update;
$ sudo apt-get install -y apt-transport-https &&
$ sudo apt-get update &&
$ sudo apt-get install -y dotnet-sdk-5.0
3. Install the runtime v5
Now install .NET 5 runtimes. This helps to run your application locally with an embedded server:
$ sudo apt-get install -y dotnet-runtime-5.0
When .NET is done installing, you will get a following message on your command line that Microsoft collects some usage data and sends that data for research purposes. You can choose to disable it using system environment variables. It is your personal choice to keep telemetry running or not.
4. Verify .NET installation
Now it is time to verify the installation. Simply run the following command to confirm that .NET has successfully installed and exists on your system:
$ dotnet --version
This command will display the exact version of .NET installed on your system via your Debian CLI.
How to Remove .NET v5 from your Debian Linux system ?
If you ever want to remove .NET from your system then you can choose to run the following simple apt commands to get rid of it:
$ sudo apt-get remove dotnet-sdk-5.0
$ sudo apt-get remove dotnet-runtime-5.0
These two commands are enough to remove .NET. However, Microsoft repositories will still exist on your system in case you want to install and run .NET again.
[Need assistance in Installing any Linux Open Source Software ? We can help you. ]