Started playing with some of the .NET Core source code this week and decided to try it on the Windows 10 Subsystem for Linux. I found the install page and ran some commands in the console to find out what version of Linux was running:
$ uname -a
Linux DESKTOP-12345 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
So I followed the instructions for Ubuntu 14.o4 but immediately received an error on the first script
$ sudo sh -c ‘echo “deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotne$ sudo sh -c ‘echo “deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main” > /etc/apt/sources.list.d/dotnetdev.list’
sudo: unable to resolve host DESKTOP-12345
So I dug around on this error to find that I needed to add a host entry for my computer name. You can edit the etc/hosts file using VIM if you dare:
$ sudo vim /etc/hosts
Its really not that bad.
- Press “i” to enter insert mode
- Add you host entry “127.0.0.1 [computername]”
- Hit escape to exit insert mode
- Type “:wq!” to save and quit
After that the install scripts worked like a champ.
Please let me know in the comments below if this post was helpful or you have further questions.