Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Getting started with Bash for Azure Cloud Shell

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Having learned about the Azure Cloud Shell overview and getting started with Azure Powershell, let's take a look at the Bash Quick start in Azure Cloud Shell.

1. Log in to Azure Portal and start CloudShell

Start Cloud Shell from the navigation bar, as shown below

Switch to Bash

Click OK to switch to Bash

Enter the Bash environment

two。 View and set preferred subscriptions

Use az account list to view

Use az account set to set preferred subscriptions

3. Create a resource group

Create a new resource group called "TestBash" in EastUS. Enter the following command az group create-- location eastus-- name TestBash

4. Create Linux VM

Create a Ubuntu VM in the new resource group. Entering the following command az vm create-n BashQS-g TestBash-- image UbuntuLTS-- generate-ssh-keys,Azure CLI in Bash will create the SSH keys and use them to create the setup VM.

5. Link to Linux VM through SSH

Find the virtual machine you just created in the portal, as shown below.

Click the link-SSH, find "Log in using VM Local account", and copy the string in the text box, as shown in the following figure

Paste the copied ssh command into ssh yunze2018@13.90.246.141 in the Bash window. After the connection is successful, you can see the welcome screen, as shown in the following figure.

You can view the hostname and IP address

6. Clear

Exit ssh using the exit command

Use the az group delete command to delete the resource group you just created and all resources under it

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report