Much has changed in the IT world in the last few years, first Microsoft Loves Linux and now Red Hat Loves .NET.
I suspect for many of you it is a bit bewildering, however, there are huge wins here for software developers. C# is rapidly becoming the programming language with the greatest number of target platforms, including: iOS, Android, OSX, and now through the partnership with Red Hat (home of the worlds' most popular enterprise Linux platform) C# is becoming a first class citizen on Linux:
yum install -y rh-dotnet-core10 scl enable rh-dotnet-core10 bash
yum install and
scl enable commands (above) are as of April 12, where we used a nightly build. You will want to double-check the release notes when .NET on Red Hat Enterprise Linux (RHEL) reaches an official Beta/Technology Preview status, and is released through official channels.
Now let's get a simple "hello world" app running. The following commands will create a new project, build, and run it. It's hard to get much easier than this when bootstrapping a new project:
mkdir hello cd hello dotnet new dotnet restore dotnet run
If you're reading this and thinking, "but I don't have RHEL 7.2 so I can't try this out," you can actually download our Hyper-V and VirtualBox images in which we've pre-installed .NET, Docker and Visual Studio Code on RHEL 7.2.
Note: The pre-installed Visual Studio Code did not yet have the C# extensions installed, so just click when prompted for the installation:
If you're new to Linux entirely, we also have a cheetsheat for the Linux command line to help you navigate and learn your way.
The recording for our April 12 Sneak Peak is available online. If you have an hour, please give it a watch and give us your feedback. Lastly, f you want to deliver your own .NET on Linux presentation, our slides are available via Google Docs, feel free to download and fork them for your own needs. All of the example .NET code is available at https://github.com/DonSchenck/DotNetOnLinux.
For additional information and articles on .NET Core visit our .NET Core web page for more on this topic.
Last updated: September 3, 2019