sudo dpkg -i powershell_<version>.deb After installation, restart your PowerShell session and run:
# Update package list and upgrade PowerShell sudo apt update sudo apt upgrade powershell If not installed via repository, download the latest .deb from GitHub and run: how to update power shell
brew upgrade powershell Or download the latest .pkg from the GitHub releases page. Using apt with Microsoft repository: sudo dpkg -i powershell_<version>
winget upgrade --id Microsoft.PowerShell sudo dpkg -i powershell_<
choco upgrade powershell-core Using Homebrew (recommended):
$PSVersionTable.PSVersion