In order to install .NET Core from Red Hat on RHEL, you first need to register using the Red Hat Subscription Manager. If this has not been done on your system, or if you are unsure, see the Red Hat Getting Started Guide.
Install .NET SDK
After registering with the Subscription Manager and enabling the .NET Core channel, you are ready to install and enable the .NET SDK.
In your command prompt, run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Update the products available for installation, then install the .NET SDK.
In your command prompt, run the following commands:
sudo dnf updatesudo dnf install dotnet-sdk-2.1
Add the dotnet product feed
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Update the products available for installation, then install the .NET SDK.
In your command prompt, run the following commands:
sudo dnf updatesudo dnf install dotnet-sdk-2.1
Add the dotnet product feed
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Update the products available for installation, then install the .NET SDK.
In your command prompt, run the following commands:
sudo yum updatesudo yum install dotnet-sdk-2.1
Add the dotnet product feed
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a command prompt and run the following commands:
Open a new command prompt and run the following commands:
dotnet new console -o myAppcd myApp
dotnet new console -o myAppcd myApp
The dotnet command creates a new application of type console for you. The -o parameter creates a directory named myApp where your app is stored, and populates it with the required files. The cd myApp command puts you into the newly created app directory.
The main file in the myApp folder isĀ Program.cs. By default, it already contains the necessary code to write "Hello World!" to the Console.
using System;
namespace myApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Run your app
In your command prompt, run the following command:
dotnet run
dotnet run
Congratulations, you've built and run your first .NET app!
Get an editor
Visual Studio is a fully-featured integrated development environment (IDE) for developing .NET apps on Windows.