Install .NET LTS by using install script
Install script provided by Microsoft has various options. Setting it appropriately, user can specify target as
- channel as Current or LTS
- SDK or runtime only
- dry run, which means just run without installation
Series of commands below is for installing the latest LTS, dry run once before installation.
cd /tmp wget https://dot.net/v1/dotnet-install.sh chmod a+x dotnet-install.sh ./dotnet-install.sh -c LTS --dry-run ./dotnet-install.sh -c LTS
In the case of installing only runtime, options are set as following.
./dotnet-install.sh -c LTS --runtime dotnet --dry-run ./dotnet-install.sh -c LTS --runtime dotnet
Install PowerShell by using "dotnet" command
In advance of installing PowerShell, environment variables below should be set at the end of ".profile".
export DOTNET_ROOT=~/.dotnet export PATH=$PATH:$DOTNET_ROOT export PATH=$PATH:$DOTNET_ROOT/tools
Then, PowerShell can be installed by using next command, and run it.
source ~/.profile dotnet tool install --global PowerShell pwsh