It is again worth repeating that .NET 6, like 5, 3 and 2 before it are cross platform and can be used to build applications in Linux and OSX.
There are two ways to get them running on Linux:
- Download and run the binaries from the .NET website
- Run an installation script that sets up the environment and tools for you. (Details are available on this link)
The second method is probably better as unlike the binaries that are distribution specific, the script should run on most mainstream Linux distributions.
First, you create a directory to hold the downloaded scripts and intermediate artifacts.
mkdir $HOME/dotnet_install && cd $HOME/dotnet_install
Next, you download the bash file that does the actual setup.
curl -L https://aka.ms/install-dotnet-preview -o install-dotnet-preview.sh
Get into the habit of reading these before you execute them!
Then, execute the file
sudo bash install-dotnet-preview.sh
You should see the following:
Note here it is the release candidate being installed. I expect it is updated regularly.
Finally you can verify that it was successfully installed.
You can also get more detailed information like so:
You should see something like this: