Run Bash Scripts from Azure Cloud Shell

In this blog post, I will show you how to run Bash scripts on Microsoft Azure Cloud Shell.

Azure Cloud Shell is a browser-based command-line tool that allows you to run and manage Azure.

Cloud Shell comes installed with PowerShell Core, Azure CLI, Dotnet, Node and other tools.

To get started with Cloud Shell visit this blog post.

Get Started

To get started, I will log in to Azure Cloud Shell and create a bash script using the command below.

touch bashscript.sh

Once my file has been created, I will open it using the built-in editor from the top menu or by typing code.

In the script file, I will type a simple bash command as shown below:

#!/bin/bash

Echo “Hello script”

To run my bash script, I will run the following command

bash bashscript.sh

Below you can see that the script has run.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.