Install Azure PowerShell on Linux

The Az PowerShell module is a rollup module. Installing it downloads the generally available Az PowerShell modules and makes their cmdlets available for use.

This article explains how to install the Az PowerShell module on Linux.

Prerequisites

Installation

Open the Terminal or other shell host application and run pwsh to start PowerShell.

Use the Install-Module cmdlet to install the Az PowerShell module:

Install-Module -Name Az -Repository PSGallery -Force

Update the Az PowerShell module

Use Update-Module to update to the latest version of the Az PowerShell module:

Update-Module -Name Az -Force

Updating the Az PowerShell module using Update-Module doesn't remove old versions of the Az PowerShell module from your system.

Uninstallation

To remove the Az PowerShell module from your system, see Uninstall the Azure PowerShell module.

Sign in

To start managing your Azure resources with the Az PowerShell module, launch a PowerShell session and run Connect-AzAccount to sign in to Azure:

Connect-AzAccount

Use your Azure account login credentials to log into the browser window that opens.

You'll need to repeat this step for every new PowerShell session you start. To learn how to persist your Azure sign-in across PowerShell sessions, see Azure PowerShell context objects.

Troubleshooting

For solutions to common installation issues with the Az PowerShell module, see Troubleshoot installation problems with the Az PowerShell module.

Provide feedback

To file an issue about the Az PowerShell module, see: file an issue on GitHub.

To provide feedback from within a PowerShell session, use the Send-Feedback cmdlet.

Next Steps

To learn more about managing your Azure resources with the Az PowerShell module, see Get Started with Azure PowerShell.