Linux 安裝 dotnet 8 sdk 示範

本篇在 Ubuntu 上使用 snap 示範

尋找套件
    
snap find dotnet
    

    
snap find dotnet
Name                         Version  Publisher     Notes    Summary
dotnet-sdk                   8.0.100  dotnetcore✓   classic  Develop high performance applications in less time, on any platform.
dotnet-runtime-21            2.1.30   dotnetcore✓   -        Cross-Platform .NET Core Runtime.
dotnet-runtime-60            6.0.25   dotnetcore✓   -        Cross-Platform .NET Runtime.
dotnet-runtime-80            8.0.0    dotnetcore✓   -        Cross-Platform .NET Core Runtime.
dotnet-runtime-70            7.0.14   dotnetcore✓   -        Cross-Platform .NET Core Runtime.
dotnet-runtime-31            3.1.32   dotnetcore✓   -        Cross-Platform .NET Core Runtime.
dotnet-runtime-50            5.0.17   dotnetcore✓   -        Cross-Platform .NET Runtime.
    

安裝:
    
sudo snap install dotnet-sdk --classic
    

指定版本安裝
    
sudo snap install dotnet-sdk --channel=8.0/beta --classic
    

設定別名:
(不然不能使用 dotnet 這個指令)
    
sudo snap alias dotnet-sdk.dotnet dotnet
    

查看 dotnet 版本
    
dotnet --version
    

查看可安裝的版本:
    
snap info dotnet-sdk
    

指定替換的版本:
    
sudo snap refresh dotnet-sdk --channel=8.0/stable
    

留言