#!/bin/bash # 安装 .NET 6.0 x64 Runtime echo "正在下载并安装 .NET 6.0 x64 Runtime..." echo "需要管理员权限,请输入您的密码:" curl -sSL https://dot.net/v1/dotnet-install.sh | sudo bash /dev/stdin --runtime dotnet --version 6.0.36 --arch x64 --install-dir /usr/local/share/dotnet/x64 echo "" echo "安装完成!验证安装:" export PATH="/usr/local/share/dotnet/x64:$PATH" dotnet --list-runtimes