Register Microsoft key and feed
1 2 3 4 |
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb |
Install the .NET SDK
1 2 3 |
sudo add-apt-repository universe |
1 2 3 |
'universe' distribution component is already enabled for all sources. |
위 에러시
1 2 3 4 5 |
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" 안되면 sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" |
계속진행
1 2 3 4 5 6 |
sudo apt-get update sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install dotnet-sdk-3.0 |
Hello World
1 2 3 4 5 6 7 |
cd /var/www dotnet new console -o HelloWorld cd HelloWorld dotnet run => Hello World! |
1 2 3 4 5 6 7 |
# 제거 # 3.0 sudo apt-get remove dotnet-sdk-3.0 #2.3 sudo apt-get remove dotnet-sdk-2.2 |