Debianに.Net dotnetをインストールする

Debianに.Net dotnetをインストールする

./dotnet-install.shをダウンロードし、正常にインストールしました。

$ ./dotnet-install.sh -c Current
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core SDK version 5.0.207 is already installed.
dotnet-install: Adding to current process PATH: `/home/tesla/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

パスを追加しました

└─$エクスポートパス=$PATH:/home/tesla/.dotnet

ネット - バージョン5.0.207

2つの質問があります。

まず、コンピュータを再起動するたびに2番目のvsコードを再インストールする必要があります。端末に dotnet --version コマンドは表示されません。

"Command 'dotnet' not found, but can be installed with:
sudo snap install dotnet-sdk   # version 5.0.401, or
sudo apt  install dotnet-host
See 'snap info dotnet-sdk' for additional versions. "

vscode 端末でパスを設定すると、vscode を再起動した後に dotnet コマンドが認識されません。

ベストアンサー1

~/.profile または ~/.bashrc ファイルに PATH を追加する必要があります。

PATH=$PATH:/home/tesla/.dotnet

今すぐ変更を更新

source ~/.profile 
or
source ~/.bashrc

おすすめ記事