Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instruction for installing specific version #2801

Merged
merged 7 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs-ref-conceptual/includes/cli-install-linux-apt.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,21 @@ If you prefer a step-by-step installation process, complete the following steps
sudo apt-get install azure-cli
```

## Sign in to Azure with the Azure CLI
## Install specific version

Run the Azure CLI with the `az` command. To sign in, use the [az login](/cli/azure/reference-index#az_login) command.
You must first configure `azure-cli` repository information as shown above. Available versions can be found at [Azure CLI release notes](/cli/azure/release-notes-azure-cli).

[!INCLUDE [interactive-login](interactive-login.md)]
1. To view available versions with command:

To learn more about different authentication methods, see [Sign in with Azure CLI](../authenticate-azure-cli.md).
```bash
apt-cache policy azure-cli
```

2. To install specific version:

```bash
sudo apt-get install azure-cli=<version>-1~bullseye
```

## Troubleshooting

Expand Down
17 changes: 13 additions & 4 deletions docs-ref-conceptual/includes/cli-install-linux-dnf.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,22 @@ for the Azure CLI. This package has been tested with RHEL 7.7, RHEL 8, Fedora 24
```bash
sudo dnf install azure-cli
```

Run the Azure CLI with the `az` command. To sign in, use [az login](/cli/azure/reference-index#az_login) command.

## Install specific version

[!INCLUDE [interactive-login](interactive-login.md)]
You must first configure `azure-cli` repository information as shown above. Available versions can be found at [Azure CLI release notes](/cli/azure/release-notes-azure-cli).

To learn more about different authentication methods, see [Sign in with Azure CLI](../authenticate-azure-cli.md).
1. To view available versions with command:

```bash
dnf list --showduplicates azure-cli
```

2. To install specific version:

```bash
sudo dnf install azure-cli-<version>-1.el7
```

## Troubleshooting

Expand Down
8 changes: 1 addition & 7 deletions docs-ref-conceptual/includes/cli-install-linux-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ manager: barbkess
ms.date: 12/15/2020
ms.topic: include
ms.service: azure-cli
ms.devlang: azurecli
ms.devlang: azurecli
ms.custom: devx-track-azurecli
---

Expand Down Expand Up @@ -37,12 +37,6 @@ curl -L https://aka.ms/InstallAzureCli | bash

The script can also be downloaded and run locally. You may have to restart your shell in order for changes to take effect.

You can then run the Azure CLI with the `az` command. To sign in, use [az login](/cli/azure/reference-index#az_login) command.

[!INCLUDE [interactive-login](interactive-login.md)]

To learn more about different authentication methods, see [Sign in with Azure CLI](../authenticate-azure-cli.md).

## Troubleshooting

Here are some common problems seen during a manual installation. If you experience a problem not covered here, [file an issue on GitHub](https://github.com/Azure/azure-cli/issues).
Expand Down
20 changes: 15 additions & 5 deletions docs-ref-conceptual/includes/cli-install-linux-zypper.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ manager: barbkess
ms.date: 11/24/2020
ms.topic: include
ms.service: azure-cli
ms.devlang: azurecli
ms.devlang: azurecli
ms.custom: devx-track-azurecli
---

Expand Down Expand Up @@ -46,11 +46,21 @@ for the Azure CLI. This package has been tested with openSUSE Leap 15.1, and SLE

Input 2 to continue install by ignoring some of its dependencies.

You can then run the Azure CLI with the `az` command. To sign in, use [az login](/cli/azure/reference-index#az_login) command.
## Install specific version

[!INCLUDE [interactive-login](interactive-login.md)]
You must first configure `azure-cli` repository information as shown above. Available versions can be found at [Azure CLI release notes](/cli/azure/release-notes-azure-cli).

To learn more about different authentication methods, see [Sign in with Azure CLI](../authenticate-azure-cli.md).
1. To view available versions with command:

```bash
zypper search --details --match-exact azure-cli
```

2. To install specific version:

```bash
sudo zypper install --from azure-cli azure-cli=<version>-1.el7
```

## Troubleshooting

Expand Down Expand Up @@ -108,7 +118,7 @@ allow HTTPS connections to the following addresses:

### SSL certificate problem

When a certificate is broken or outdated on a machine, you may receive an error indicating that curl failed to verify the legitimacy of the server and therefore could not establish a secure connection. Update your certificate to correct the problem.
When a certificate is broken or outdated on a machine, you may receive an error indicating that curl failed to verify the legitimacy of the server and therefore could not establish a secure connection. Update your certificate to correct the problem.

```bach
sudo zypper update-ca-certificates
Expand Down
8 changes: 1 addition & 7 deletions docs-ref-conceptual/install-azure-cli-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ manager: barbkess
ms.date: 08/19/2021
ms.topic: conceptual
ms.service: azure-cli
ms.devlang: azurecli
ms.devlang: azurecli
ms.custom: devx-track-azurecli, seo-azure-cli
keywords: Install azure cli, azure cli macos, macos cli, install azure cli macos
---
Expand Down Expand Up @@ -38,12 +38,6 @@ brew update && brew install azure-cli
> The Azure CLI is guaranteed to be compatible with the latest version of `python3`
> published on Homebrew.

You can then run the Azure CLI with the `az` command. To sign in, use [az login](/cli/azure/reference-index#az_login) command.

[!INCLUDE [interactive-login](includes/interactive-login.md)]

To learn more about different authentication methods, see [Sign in with Azure CLI](authenticate-azure-cli.md).

## Troubleshooting

If you encounter a problem when installing the CLI through Homebrew, here are some common errors. If you experience a problem not covered here, [file an issue on github](https://github.com/Azure/azure-cli/issues).
Expand Down
21 changes: 11 additions & 10 deletions docs-ref-conceptual/install-azure-cli-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ ms.prod: azure
ms.date: 08/19/2021
ms.topic: conceptual
ms.devlang: azurecli
ms.technology: azure-cli
ms.technology: azure-cli
ms.custom: devx-track-azurecli, seo-azure-cli
keywords: Install azure cli, azure cli download, cli for windows, install azure cli on windows, azure cli windows, install azure cli windows
---

# Install Azure CLI on Windows

The Azure Command-Line Interface (CLI) is a cross-platform command-line tool that can be installed locally on Windows computers. You can use the Azure CLI for Windows to connect to Azure and execute administrative commands on Azure resources. The Azure CLI for Windows can also be used from a browser through the Azure Cloud Shell or run from inside a Docker container.
The Azure Command-Line Interface (CLI) is a cross-platform command-line tool that can be installed locally on Windows computers. You can use the Azure CLI for Windows to connect to Azure and execute administrative commands on Azure resources. The Azure CLI for Windows can also be used from a browser through the Azure Cloud Shell or run from inside a Docker container.

For Windows, the Azure CLI is installed via a MSI, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell.
When installing for Windows Subsystem for Linux (WSL), packages are available for your Linux distribution. See the [main install page](install-azure-cli.md)
Expand All @@ -31,16 +31,20 @@ The MSI distributable is used for installing or updating the Azure CLI on Window

When the installer asks if it can make changes to your computer, click the "Yes" box.

### Azure CLI current version
### Current version

Download and install the current release of the Azure CLI. After the installation is complete, you will need to close and reopen any active Windows Command Prompt or PowerShell windows to use the Azure CLI.

> [!div class="nextstepaction"]
> [Current release of the Azure CLI](https://aka.ms/installazurecliwindows)

### Specific version

To download the MSI installer for specific version, change the version segment in URL `https://azcliprod.blob.core.windows.net/msi/azure-cli-<version>.msi` and download it. Available versions can be found at [Azure CLI release notes](/cli/azure/release-notes-azure-cli).

### Azure CLI beta version

The beta version of the Azure CLI supports all commands and will stay in sync with the current released version. For installation instructions, see [Install Azure CLI beta version](install-azure-cli-beta.md).
The beta version of the Azure CLI supports all commands and will stay in sync with the current released version. For installation instructions, see [Install Azure CLI beta version](install-azure-cli-beta.md).

# [Microsoft Installer (MSI) with Command](#tab/azure-powershell)

Expand All @@ -59,6 +63,8 @@ Start PowerShell as administrator and run the following command:

This will download and install the latest version of the Azure CLI for Windows. If you already have a version installed, the installer will update the existing version.

To install specific version, replace the `-Uri` argument with `https://azcliprod.blob.core.windows.net/msi/azure-cli-<version>.msi` with version segment changed. Available versions can be found at [Azure CLI release notes](/cli/azure/release-notes-azure-cli).

> [!Note]
> After the installation is complete, you will need to reopen PowerShell to use the Azure CLI.

Expand All @@ -69,12 +75,7 @@ This will download and install the latest version of the Azure CLI for Windows.

## Run the Azure CLI

You can now run the Azure CLI with the `az` command from either Windows Command Prompt or PowerShell. PowerShell offers some tab completion features
not available from Windows Command Prompt. To sign in, run the [az login](/cli/azure/reference-index#az_login) command.

[!INCLUDE [interactive-login](includes/interactive-login.md)]

To learn more about different authentication methods, see [Sign in with Azure CLI](authenticate-azure-cli.md).
You can now run the Azure CLI with the `az` command from either Windows Command Prompt or PowerShell.

## Troubleshooting

Expand Down
14 changes: 10 additions & 4 deletions docs-ref-conceptual/run-azure-cli-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ with an isolated environment to run the CLI in. The image can also be used as a
## Install Azure CLI in Docker

> [!NOTE]
> The Azure CLI has migrated to [Microsoft Container Registry](https://azure.microsoft.com/services/container-registry).
> The Azure CLI has migrated to [Microsoft Container Registry](https://azure.microsoft.com/services/container-registry).
> Existing tags on Docker Hub are still supported, but new releases will only be available as mcr.microsoft.com/azure-cli.

Install the CLI using `docker run`.
Expand All @@ -37,11 +37,17 @@ Install the CLI using `docker run`.
> docker run -it -v ${HOME}/.ssh:/root/.ssh mcr.microsoft.com/azure-cli
> ```

The CLI is installed on the image as the `az` command in `/usr/local/bin`. To sign in, run the [az login](/cli/azure/reference-index#az_login) command.
The CLI is installed on the image as the `az` command in `/usr/local/bin`.

[!INCLUDE [interactive-login](includes/interactive-login.md)]
## Install specific version

To learn more about different authentication methods, see [Sign in with the Azure CLI](authenticate-azure-cli.md).
Available versions can be found at [Azure CLI release notes](/cli/azure/release-notes-azure-cli).

To install specific version:

```bash
docker run -it mcr.microsoft.com/azure-cli:<version>
```

## Update Docker image

Expand Down