Run .NET Core on Ubuntu with Snap
The other day I was playing around with .NET Core, I decided to provision a Ubuntu Server Core and play around with .NET Core on Ubuntu.
I have not played with Ubuntu in a while, not since I started to use Alpine Linux like 2 years ago, and CentOS 4 years before that. Apparently in the time, Ubuntu has had some new additions like snap
or Snappy
.
Snap are Canonical's answer to Flatpak, self-contained (aka PortableApps) for Linux.
Install .NET Core SDK CLI on Ubuntu with Snap
snap install dotnet-sdk --classic
Run .NET Core SDK CLI
dotnet-sdk.dotnet --help
For some reason, you can only access .NET Core as dotnet-sdk.dotnet
. So far, I have not had any luck with creating a symlink, so I can access cli with dotnet
.
Conclusion
Snap provides a better installation experience then the official way to install .NET Core.
On other hand you can just run it in docker.
docker run -ti mcr.microsoft.com/dotnet/core/sdk:2.2-bionic