# How to Install Dot Net core 3.1 on digital ocean and create c# console app

#### Check the ubuntu version by using this command    
   
`$ lsb_release -a`    
  

![dotnetcore_1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648026494064/HyF-p2FPH.png)    

####    Let’s Add the Microsoft package signing key       
   
`$ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb`    
  

![dotnetcore_2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648026575692/B3YVyzlpt.png)     
  
####  run the command below    
   
`$ sudo dpkg -i packages-microsoft-prod.deb`     
   

![dotnetcore_3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648026659667/FSYGRZB-R.png)   
   
#### Install .NET core 3.1 on Ubuntu 20.04      
   
`$ sudo apt-get install -y apt-transport-https`    
   
`$ sudo apt-get update`     
  
`$ sudo apt-get install -y dotnet-sdk-3.1`     
  

![dotnetcore_4.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648026896855/t3CtL398X.png)
    

![dotnetcore_5.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648026907600/JG92D1OIQ.png)      
  

![dotnetcore_6.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648026938057/STCSvSGGE.png)        
   
####  Verify the installation by using the command below      
   
`$ dotnet --info`    
  

![dotnetcore_7.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648027001806/h-2w6f9qK.png)
    
#### Create c# console application    
  
`$ dotnet new console -o hellowordapplication`     
    

![consoleappc#_1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648027513198/dwX1mYUgT.png)     
  
#### run the application    
  
`$ cd hellowordapplication`      

`$ dotnet run`    
    

![consoleapp_c#_2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1648027595116/swFPrbNUZ.png)

