by Santhakumar Munuswamy
Posted on01 October 2016
.NET Core
In this article, we will discuss how we can setup .Net Core on linux environment, Prerequisite,Developing a console application on Linux , etc. As we discussed understanding about .NET Core with hello world application on windows in my previous articles. If you want to learn .NET Core and its features, you can read the below link:
Understanding the .NET Core in Windows Let’sstartwiththeprerequisitesYou have to download the following software's and install them on your PC
VMware Ubuntu 14.4 / Linux Mint 17 .NET Core SDK 1.0VMware
Y oucandownloadtrailversionandinstallVMwarefromthe VMwaresite (or)Y oucandownloadopensourceandinstallVirtualBoxfromthe VirtualBoxCommunitysite
Ubuntu14.04
Y oucandownloadandinstalltheUbuntuOSfromthe Ubuntusite
.NETCoreSDK
Y oucandownloadandinstallthe.NetCoreSDKasfollowingcommands:
sudoapt-getinstalldotnet-dev-1.0.0-preview2-003131
Let’sstartimplementationYouareabletoimplement.NETCorewithdifferentmethodssuchasCommandline and VisualStudioCodeEditor .
SettinguptheEnvironment
UsingCommandline,proceduresaregivenbelow:-
I fyouwanttoknowhowtoinstallthe.NETCoreonUbuntu14.4/LinuxMint17,let’sstartwithstep-by-stepguidelines,
OpentheTerminalEmulator CopyandpastthefollowingcommandinTerminal,thenEnter sudo sh-c'echo"deb[arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trustymain"> /etc/apt/sources.list.d/dotnetdev.list'sudoapt-keyadv--keyserverapt-mo.trafficmanager.net --recv-keys417A0893

CopyandpastthefollowingcommandinTerminal,thenEnter
sudoapt-getupdate


CopyandpastthefollowingcommandinTerminal,thenEnter
sudoapt-getinstalldotnet-dev-1.0.0-preview2-003131


DevelopingaHelloWorldConsoleApplicationonLinux
TypemkdirProjectcdProjectandEnterinthecommandline.

TypemkdirConsoleHelloWorldApp,cdConsoleHelloWorldAppandEnterinthe commandline TypedotnetnewandEnterinthecommandline,givenbelow


Typedotnetrestoreandenterinthecommandline,givenbelow

Typedotnetrunandenterinthecommandline,givenbelow

DevelopingaDisplayCurrentDateTimeConsoleApplicationonLinux
Open program.cs with gedit You can implement the get current date time functional and call the function in main method Type dotnet run and enter in the command line, given below
Reference
Conclusion
I hope, you understood setup .Net Core on Linux environment, Prerequisite, Developing a console application on Linux and running it. I have covered all the required things. If you find anything that I missed in this article, please let me know. Please share your valuable feedback or suggestions