Azure Cloud Shell

Natasha Ong
This is some text inside of a div block.
4 min read

In a nutshell:

Shells are the bridge between human and computer language. They let us talk to our computer through text commands.
Azure offers Azure PowerShell and Azure CLI as their shell options to communicate with Azure resources.
Azure Cloud Shell is a web-based, cloud-hosted shell for convenience and scalability in managing Azure resources.
Both Azure Cloud Shell and the Azure Portal enable resource management, but they cater to different preferences and use cases. Some users may prefer the efficiency and automation capabilities of CloudShell, while beginners may find the Azure Portal more user-friendly and intuitive.

Shells

How does your computer know what you want it to do? The answer is shells!

Humans speak one language, and computers speak another. A shell is the communication tool that bridges this gap. It lets you talk to your computer through text commands.

In Azure, Azure PowerShell and Azure CLI are shells that allow you to send text-based commands directly to Azure to manage your resource.

Azure PowerShell

With Azure PowerShell, you are speaking in a language called PowerShell.

  • You create PowerShell commands called "cmdlets" to communicate with Azure's servers.
  • These cmdlets can do all sorts of things, from setting up a single resource to orchestrating hundreds of resources.
  • You can even write scripts to make the magic happen over and over again.
  • You can install and set up Azure PowerShell on Windows, Linux, and Mac.

What is the Azure CLI?

The Azure CLI can do the exact same tasks as Azure PowerShell, it simply speaks a different language – Bash.

  • Just like Azure PowerShell, you can install and set up Azure CLI on Windows, Linux, and Mac.

The choice between Azure CLI and Azure PowerShell simply comes down to which language you're more comfortable with speaking! Once you have one installed, you simply open Command Prompt (if you're using Windows) or Terminal (if you're using MacOS and Linux) to start using them to interact with Azure!

Aren't I already interacting with Azure on the Azure Portal?

Absolutely! When you interact with Azure through the Azure Portal, the magic of shells happens behind the scenes. Azure translates the buttons you click on and the options you select into commands in Azure PowerShell or Azure CLI. Then, those translated commands are what gets sent to Azure's servers!

Azure Cloud Shell

Azure Cloud Shell is also a shell, but it's a little different. It's a web-based shell (i.e. it lives on the cloud instead of your local computer) that lets you use Azure PowerShell or Azure CLI without needing to install anything on your computer.

Having a web-based shell makes using shells highly accessible and convenient:

  • You don't have to download shells if you're just using a different device for the day.
  • Since CloudShell is cloud-based, your configurations and scripts are also stored in the cloud. You can access your environment from anywhere, ensuring consistent work.
  • There's no need to worry about software updates, compatibility issues, or resource constraints on your local machine. Everything is ready and up-to-date in the cloud.

Azure Cloud Shell vs Azure Portal

Azure Cloud Shell and Azure Portal do the same things in terms of resource management. So why do both exist?

For beginners, it's often a good idea to start with the Azure Portal. The Azure Portal has a visual and user-friendly design, making it easier to explore and understand Azure services and resources. It's like the city map with all the landmarks labeled, so you can get familiar with the layout.

As beginners gain more confidence and want to perform more advanced tasks or automation, that's when Azure Cloud Shell can be incredibly useful. Instead of navigating a visual interface, you give direct commands. Cloud Shell also has superpowers that you can't find in the Azure Portal - you can make Cloud Shell automate tasks for you, and fine-tune your commands to a level beyond the Portal's standard options.

This makes Cloud Shell super convenient and powerful, but you need to know which tool to pick and how to use it effectively. Cloud Shell is command-line driven*, which might be a bit overwhelming for complete beginners.

*This is what we mean by command-line driven! Azure Cloud Shell is the black box at the bottom: