
C# is a strong-type, multiparadigm programming language developed by Microsoft as part of the .NET platform.
Its syntax is object-oriented and was based on C++, but it includes many influences from other programming languages, such as Object Pascal and, mainly, Java, the latter being its biggest competitor.
In this article we will see how to install on any Distribution GNU/Linux .
With wget
wget https://dot.net/v1/dotnet-install.shor with cURL
curl -LO https://dot.net/v1/dotnet-install.shsudo or rootsudo chmod +x ./dotnet-install.sh./dotnet-install.sh --version latestAlthough it’s optional, it’s good to make the command global, this will be good for many circumstances!
sudo mv ./.dotnet/ /opt/dotnet$PATH and for CSharp to find the root documentRun the three commands below in order:
echo -e '\nexport DOTNET_ROOT=/opt/dotnet' | sudo tee -a /etc/profile
echo 'export PATH=$PATH:/opt/dotnet:/opt/dotnet/tools' | sudo tee -a /etc/profile
source /etc/profiledotnet commanddotnet --version
dotnet --helpCreate a new project
dotnet new console -o HelloWorldEnter the project, compile and run:
cd HelloWorld
dotnet build
dotnet run