DEV Community

Jay Gordon for Microsoft Azure

Posted on • Updated on

Azure Cloud Shell Tips for SysAdmins (bash)

As an Azure Advocate, one of the things I spend my time doing is learning the easiest ways for beginners to use Microsoft Azure. Today I want to share with you a few ways to utilize some tools that are built right into Azure.

The Azure Cloud Shell is one of my favorite things about using Azure. Many of the administrative tasks that I may have had to run from a local computer can now be done from a browser anywhere I can authenticate into my Azure account. I used to always worry about needing a computer that had a shell or a terminal program with my ssh key on it all the time. Now, I am keeping much of this on my Azure Cloud Shell so I can work pretty much anywhere.

The Azure Cloud Shell can run either bash or Powershell.

  1. Launch Cloud Shell from the top navigation of the Azure portal.

  2. Select a subscription to create a storage account and Microsoft Azure Files share.

  3. Select "Create storage"

  4. Select the Bash environment.

Great. Now let's open a new tab from the Cloud Shell and get a full-size shell, or you can just navigate your browser to to access full view:

There are a number of tools that as a SysAdmin moving to the Cloud you may find helpful.

Cool Tools!

Let's look at some of the CLI tools available to make your life much easier when you're getting started with Azure.


There's a simple version of VS Code that's part of your Azure that will allow you to create or edit files right in your shell. Need a scratch pad while running a demo? That's another really cool feature. To access it, just type code in your shell:


Ansible is a tool for automating apps and infrastructure by utilizing YAML based playbooks that have become part of many SysAdmin's daily tasks.

Ansible is ready to use in the Azure Cloud Shell permitting you to begin immediately with existing playbooks you may have written elsewhere. No agents are required, just prep your ssh key and get working.

You can watch my full video on using Ansible with Azure here:


If you plan on using the Azure Kubernetes Service, you're going to need to familiarize yourself with kubectl which is available right in your Cloud Shell with no additional installation required. Kubectl is the command line interface you'll use to work with your AKS clusters.

Here's an example of using kubectl to get credentials of an AKS cluster I built along with the status of the cluster nodes:


Of course Azure is going to have CLI tools for you to manage your resources! The az tool is everything you need right from the same browser-based shell! The Azure command-line interface (CLI) is Microsoft's cross-platform command-line experience for managing Azure resources. The Azure CLI is easy to learn and the perfect tool for building custom automation that works with Azure resources.

I really recommend checking out the Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using the Azure CLI tutorial to get a great walk-through of using AKS along with the Azure CLI.


Having a place you can always ssh into the production environment that you trust is important. Cloud Shell allows you to provide your ssh keys as you would in almost any other "Linux" environment to log into systems when you need to.

Any more tips?

Any more tips you'd like me to provide you? I am always looking to listen to what people from various level of experience are looking to learn about. Please leave a comment below!

Thanks and enjoy using Azure!

Top comments (0)