• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Dotnet Core on Ubuntu 18.04

Written by Rahul, Updated on September 21, 2020

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. Dotnet core framework already provides scaffolding tools for bootstrapping projects.

This tutorial is an walk through to install dotnet core on Ubuntu 18.04 Linux system. Also created a sample application using dotnet core.

Step 1 – Setup PPA

The Microfosft offical team provides and debian packages to create PPA on Ubuntu systems. You just need to download the debian package and install on your system.

Press CTRL + ALT + T to open a terminal on Ubuntu system and configure Microsoft PPA by run the following commands:

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

Step 2 – Install Dotnet Core on Ubuntu

Dotnet core is the Software development kit used for developing applications. If you are going to create a application or making changes to existing application, you will required .net core sdk package on your system.

To install Dotnet core on Ubuntu 18.04 LTS system, type:

sudo apt update 
sudo apt install apt-transport-https -y 
sudo apt install dotnet-sdk-3.1 

install dotnet core ubuntu

To install the previous version of .Net Core SDK 2.1, type:

sudo apt install dotnet-sdk-2.1

Step 3 – Install Dotnet Core Runtime Only

.NET Core Runtime is required for the system, where you only need to run application. For example, production or stating environments are required to run applications only.

To install Dotnet core runtime on Ubuntu 18.04 Linux system, execute:

sudo apt update 
sudo apt install apt-transport-https -y
sudo apt install dotnet-runtime-3.1 

To install the previous version of .Net core runtime 2.1, type:

sudo apt install dotnet-runtime-2.1

Step 4 – Create Dotnet Core Application

Let’s create a sample application with dotnet core on your Ubuntu system. Create a new console application with the command:

dotnet new console -o HelloWorld

The Above command will create dotnet application on your system. This will create a directory named “helloworld” in under the current directory. Switch to this directory and start working your application.

cd  HelloWorld

Make your changes to application and execute below command to run this application.

dotnet run

run dotnet core application

Conclusion

In this tutorial, you have learned to install Dotnet Core on Ubuntu 18.04 LTS Linux system.

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy