Mastering Azure CLI-1

Updated: Sep 12

Azure Cloud administration using Cloud Shell and Azure CLI - tips and tricks.



This is a multi-part series of posts. In the series of posts you will learn and master how to use azure cli for manging Azure cloud.

Why Azure Cloud Shell?

In this post I am going to show how to use Azure Cloud Shell

Command line is undisputable choice for most of the seasoned administrators. The reason - it's sleek, controlled and you exactly know what you are doing.

Azure Cloud Shell is :

  • interactive

  • authenticated

  • browser-accessible shell

  • Integration with several environment / clients such as

Azure cloud shell provides flexibility of choosing the shell experience between PowerShell (if you come from Windows OS administrative background or Bash (if you come from Linux/Unix OS background).

 

Why Cloud Shell is my favorite?

One of the reason why cloud shell is my favorite interface is it's seamless integration with several open-source tools. It saves me from

  • Downloading and installing tools from different sources (which may sometime lead to installing malicious code on my system).

  • Installing these tools locally leaves lots of foot print

  • Many of them require administrative privileges to update registry etc. which may crash my system).

Treasure of Tools Integrated with Cloud Shell

Look at the list below - you will find a list of tools that are available and have built-in integration with most useful and needed open-source and Microsoft provided tools.

​Category

Name

Linux

bash

zsh

sh

tmux

dig

Azure

Text Editors

code (Cloud Shell editor)

vim

nano

emacs

source control

git

Build Tools

make

maven

npm

pip

Containers

Databases

MySQL client

PostgreSql client

sqlcmd Utility

mssql-scripter

Other

Let us now start and explore cloud shell and then we will

Getting Started with Azure CLI


Azure CLI is has simple syntax. Do pay special attention to order :


$az [ group ] [ subgroup ] [ command] {parameters

Let us break down the above command template

​Componet

Meaning

az

CLI executable

group

represents the Azure service name (why group ? it is called as group because a service may have several sub component)

subgroup

represents sub component of service (group)

command

action such as create, list etc.

parameters

additional information needed to perform the action or complete the action.

Practice Now

It will make more sense if we see this in action.


  • Start cloud shell by clicking on Cloud Shell icon

  • If you are starting cloud for the first time you will be asked to select between Bash or PowerShell.


  • After the first launch you can switch between the shell type by using shell type drop-down.

  • Once you are in the cloud-shell you can start using azure cli commands or PowerShell cmdlets for example you can use CLI command like az account list .




Read my next post to learn more about Azure CLI. In the next post I will explain some tricks to use for rapid learning of Azure CLI. Till then bye..


IMG_0166_edited.jpg

Hi, I'm Nived Varma

Looking to try something new and enjoyable? Need a bit of one-on-one guidance from a reliable professional? Sometimes all it takes to really understand a concept is a considerate instructor who knows how to teach at your pace. Having worked with clients throughout India and abroad since 1995, I bring a depth of teaching experience and knowledge to those who are eager to expand their minds, talents, and skills. Contact me to see how I can be of service to you.

  • Facebook
  • LinkedIn

Creativity. Productivity. Vision.

What is it that fuels you? For me, it’s SKILLMENTORING. I love writing about my daily life and what interests me, and sharing all of my thoughts with my readers. The site is an open and honest platform about how to make the best of what comes my way. SKILLMENTORING is truly my passion project, gaining more and more traction each day. I hope you enjoy my site and all of the unique content I offer. Take a look around; perhaps you’ll discover what exhilarates you as well. Are you ready to be inspired?

Subscribe

Thanks for subscribing!