jack@ubuntu:~$ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
[sudo] password for jack:
jack@ubuntu:~$ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
Executing: /tmp/tmp.pqSHD1mXqj/gpg.1.sh --keyserver
apt-mo.trafficmanager.net
--recv-keys
417A0893
gpg: requesting key 417A0893 from hkp server apt-mo.trafficmanager.net
gpg: key 417A0893: "MS Open Tech <interop@microsoft.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
jack@ubuntu:~$ sudo apt-get update
Get:1 https://apt-mo.trafficmanager.net/repos/dotnet xenial InRelease [2,820 B]
Get:2 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 Packages [161 kB]
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 164 kB in 25s (6,488 B/s)
Reading package lists... Done
jack@ubuntu:~$ sudo apt-get install dotnet-dev-1.0.0-preview2-003121
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dotnet-host dotnet-hostfxr-1.0.1
dotnet-sharedframework-microsoft.netcore.app-1.0.0 liblldb-3.6 libllvm3.6v5
liblttng-ust-ctl2 liblttng-ust0 liburcu4
The following NEW packages will be installed:
dotnet-dev-1.0.0-preview2-003121 dotnet-host dotnet-hostfxr-1.0.1
dotnet-sharedframework-microsoft.netcore.app-1.0.0 liblldb-3.6 libllvm3.6v5
liblttng-ust-ctl2 liblttng-ust0 liburcu4
0 upgraded, 9 newly installed, 0 to remove and 193 not upgraded.
Need to get 55.3 MB of archives.
After this operation, 170 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-host amd64 2.0.0-dev-eng-001355-00-1 [34.1 kB]
Get:2 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-hostfxr-1.0.1 amd64 1.0.1-1 [123 kB]
Get:3 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-sharedframework-microsoft.netcore.app-1.0.0 amd64 1.0.0-1 [22.6 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libllvm3.6v5 amd64 1:3.6.2-3ubuntu2 [8,075 kB]
Get:5 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-dev-1.0.0-preview2-003121 amd64 1.0.0-preview2-003121-1 [16.9 MB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 liblldb-3.6 amd64 1:3.6.2-3ubuntu2 [7,303 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 liburcu4 amd64 0.9.1-3 [47.3 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 liblttng-ust-ctl2 amd64 2.7.1-1 [72.2 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 liblttng-ust0 amd64 2.7.1-1 [127 kB]
Fetched 55.3 MB in 2min 14s (411 kB/s)
Selecting previously unselected package libllvm3.6v5:amd64.
(Reading database ... 205849 files and directories currently installed.)
Preparing to unpack .../libllvm3.6v5_1%3a3.6.2-3ubuntu2_amd64.deb ...
Unpacking libllvm3.6v5:amd64 (1:3.6.2-3ubuntu2) ...
Selecting previously unselected package liblldb-3.6.
Preparing to unpack .../liblldb-3.6_1%3a3.6.2-3ubuntu2_amd64.deb ...
Unpacking liblldb-3.6 (1:3.6.2-3ubuntu2) ...
Selecting previously unselected package liburcu4:amd64.
Preparing to unpack .../liburcu4_0.9.1-3_amd64.deb ...
Unpacking liburcu4:amd64 (0.9.1-3) ...
Selecting previously unselected package liblttng-ust-ctl2:amd64.
Preparing to unpack .../liblttng-ust-ctl2_2.7.1-1_amd64.deb ...
Unpacking liblttng-ust-ctl2:amd64 (2.7.1-1) ...
Selecting previously unselected package liblttng-ust0:amd64.
Preparing to unpack .../liblttng-ust0_2.7.1-1_amd64.deb ...
Unpacking liblttng-ust0:amd64 (2.7.1-1) ...
Selecting previously unselected package dotnet-host.
Preparing to unpack .../dotnet-host_2.0.0-dev-eng-001355-00-1_amd64.deb ...
Unpacking dotnet-host (2.0.0-dev-eng-001355-00-1) ...
Selecting previously unselected package dotnet-hostfxr-1.0.1.
Preparing to unpack .../dotnet-hostfxr-1.0.1_1.0.1-1_amd64.deb ...
Unpacking dotnet-hostfxr-1.0.1 (1.0.1-1) ...
Selecting previously unselected package dotnet-sharedframework-microsoft.netcore.app-1.0.0.
Preparing to unpack .../dotnet-sharedframework-microsoft.netcore.app-1.0.0_1.0.0-1_amd64.deb ...
Unpacking dotnet-sharedframework-microsoft.netcore.app-1.0.0 (1.0.0-1) ...
Selecting previously unselected package dotnet-dev-1.0.0-preview2-003121.
Preparing to unpack .../dotnet-dev-1.0.0-preview2-003121_1.0.0-preview2-003121-1_amd64.deb ...
Unpacking dotnet-dev-1.0.0-preview2-003121 (1.0.0-preview2-003121-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libllvm3.6v5:amd64 (1:3.6.2-3ubuntu2) ...
Setting up liblldb-3.6 (1:3.6.2-3ubuntu2) ...
Setting up liburcu4:amd64 (0.9.1-3) ...
Setting up liblttng-ust-ctl2:amd64 (2.7.1-1) ...
Setting up liblttng-ust0:amd64 (2.7.1-1) ...
Setting up dotnet-host (2.0.0-dev-eng-001355-00-1) ...
Setting up dotnet-hostfxr-1.0.1 (1.0.1-1) ...
Setting up dotnet-sharedframework-microsoft.netcore.app-1.0.0 (1.0.0-1) ...
Setting up dotnet-dev-1.0.0-preview2-003121 (1.0.0-preview2-003121-1) ...
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
Processing triggers for libc-bin (2.23-0ubuntu3) ...
jack@ubuntu:~$ mkdir hwapp
jack@ubuntu:~$ cd hwapp
jack@ubuntu:~/hwapp$ dotnet new
Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% 2663 ms
Expanding 100% 8064 ms
Created new C# project in /home/jack/hwapp.
jack@ubuntu:~/hwapp$ dotnet restore
log : Restoring packages for /home/jack/hwapp/project.json...
log : Writing lock file to disk. Path: /home/jack/hwapp/project.lock.json
log : /home/jack/hwapp/project.json
log : Restore completed in 742ms.
jack@ubuntu:~/hwapp$ dotnet run
Project hwapp (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling hwapp for .NETCoreApp,Version=v1.0
Compilation succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:01.6379192
Hello World!