Install Azure CLI 2.0

tutorial

#1

Install Azure CLI 2.0
Targeting Linaro Release 17.09 (283) till Debian Baster is released.
Using

  • Windows 10 Pro x64

Prerequisites: Setup GUI Development Environment (eMMC Boot)

Connect to DB410c with Putty with [User Name]@[IP address]

sudo su

Add temporary environment variable to simplify installation
Distro=$(lsb_release -is)
Codename=$(lsb_release -cs)
Channel=edge
Arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"

Add Azure CLI 2.0 Source List
echo "deb [arch=$Arch] https://packages.microsoft.com/repos/azure-cli/ $Codename main" | sudo tee /etc/apt/sources.list.d/azure-cli.list

apt update

Add GPG keys
apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
apt-key adv --keyserver packages.microsoft.com --recv-keys EB3E94ADBE1229CF

Add Azure CLI 2.0 package
apt-get update && sudo apt-get install azure-cli -y

exit

List Azure CLI Extension
az extension list

Install Azure IoT CLI Azure CLI Extension
az extension add -n azure-cli-iot-ext

Install Extended Batch Azure CLI Extension
az extension add -n azure-batch-cli-extensions

Install Event Hubs Azure CLI Extension
az extension add -n eventhubs

Install Event Image Copy Azure CLI Extension
az extension add -n image-copy-extension

Install Event ServiceBus Azure CLI Extension
az extension add -n servicebus

Install Event Subscription Azure CLI Extension
az extension add -n subscription

Install App Service Azure CLI Extension
az extension add -n webapp

Upgrade Azure CLI
sudo apt-get update && sudo apt-get install --only-upgrade -y azure-cli

Uninstall with apt-get remove.
sudo apt-get remove -y azure-cli

Remove the Azure CLI repository information (if not needed in the future)
sudo rm /etc/apt/sources.list.d/azure-cli.list

Remove any unneeded packages.
sudo apt autoremove