- Install the .NET SDK
brew install --cask dotnet-sdk - Create and run an app
dotnet new console -o hello && cd hello && dotnet run
Check it worked
- Check the version
dotnet --version
Undo it
- Uninstall the .NET SDK
brew uninstall --cask dotnet-sdk
- Install the libraries .NET needsNeeds sudo
sudo apt install -y libicu74Usually already there on Ubuntu Desktop. Harmless if it is.
- Install the .NET SDK with Microsoft's script
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel LTSInstalls into your home folder, so no sudo is needed.
- Add it to your PATH
echo 'export DOTNET_ROOT="$HOME/.dotnet"' >> ~/.bashrc echo 'export PATH="$PATH:$HOME/.dotnet:$HOME/.dotnet/tools"' >> ~/.bashrc source ~/.bashrc - Create and run an app
dotnet new console -o hello && cd hello && dotnet run
Check it worked
- Check the version
dotnet --version
Undo it
- Remove the .NET SDK
rm -rf ~/.dotnetThen delete the two dotnet lines from ~/.bashrc.
- Install the .NET SDK
winget install Microsoft.DotNet.SDK.10Close and reopen PowerShell afterwards.
- Create and run an app
dotnet new console -o hello; cd hello; dotnet run
Check it worked
- Check the version
dotnet --version
Undo it
- Uninstall the .NET SDK
winget uninstall Microsoft.DotNet.SDK.10