您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure Cloud Shell 的概述Overview of Azure Cloud Shell

Azure Cloud Shell 是一种交互式的经过身份验证的、经过身份验证的浏览器访问,用于管理 Azure 资源。Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. 它可以灵活地选择最适合自己工作方式的 shell 体验(Bash 或 PowerShell)。It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell.

单击以下图标,前往 shell.azure.com 试用。Try from shell.azure.com by clicking below.

嵌入启动Embed launch

尝试从 Azure 门户使用 Cloud Shell 图标。Try from Azure portal using the Cloud Shell icon.

门户启动

功能Features

基于浏览器的 shell 体验Browser-based shell experience

Cloud Shell 能够访问以执行 Azure 管理任务为宗旨构建的基于浏览器的命令行体验。Cloud Shell enables access to a browser-based command-line experience built with Azure management tasks in mind. 利用 Cloud Shell 可以不受限制地以只有云才能提供的方式从本地计算机工作。Leverage Cloud Shell to work untethered from a local machine in a way only the cloud can provide.

选择偏好的 shell 体验Choice of preferred shell experience

用户可以从 shell 下拉列表中选择 Bash 或 PowerShell。Users can choose between Bash or PowerShell from the shell dropdown.

Cloud Shell 中的 Bash

Cloud Shell 中的 PowerShell

经身份验证的已配置 Azure 工作站Authenticated and configured Azure workstation

Cloud Shell 由 Microsoft 管理,因此附带了常用的命令行工具和语言支持。Cloud Shell is managed by Microsoft so it comes with popular command-line tools and language support. 此外,Cloud Shell 还能够安全地自动执行身份验证以立即通过 Azure CLI 或 Azure PowerShell cmdlet 访问资源。Cloud Shell also securely authenticates automatically for instant access to your resources through the Azure CLI or Azure PowerShell cmdlets.

查看安装在 Cloud Shell 中的完整工具列表。View the full list of tools installed in Cloud Shell.

集成的 Cloud Shell 编辑器Integrated Cloud Shell editor

Cloud Shell 提供基于开源 Monaco Editor 的集成图形文本编辑器。Cloud Shell offers an integrated graphical text editor based on the open-source Monaco Editor. 只需通过运行 code . 来创建和编辑配置文件,即可借助 Azure CLI 或 Azure PowerShell 进行无缝部署。Simply create and edit configuration files by running code . for seamless deployment through Azure CLI or Azure PowerShell.

详细了解 Cloud Shell 编辑器Learn more about the Cloud Shell editor.

已与 docs.microsoft.com 集成Integrated with docs.microsoft.com

可以直接从 docs.microsoft.com 上托管的文档中使用 Cloud Shell。You can use Cloud Shell directly from documentation hosted on docs.microsoft.com. 它已集成在 Microsoft LearnAzure PowerShellAzure CLI 文档中 - 单击代码片段中的“试用”按钮即可开启沉浸式 shell 体验。It is integrated in Microsoft Learn, Azure PowerShell and Azure CLI documentation - click on the "Try It" button in a code snippet to open the immersive shell experience.

多个访问点Multiple access points

Cloud Shell 是一个灵活的工具,可以通过以下项使用:Cloud Shell is a flexible tool that can be used from:

连接 Microsoft Azure 文件存储Connect your Microsoft Azure Files storage

Cloud Shell 计算机是临时的,但文件通过以下两种方式持久保存:通过磁盘映像,并通过名为的已clouddrive装载文件共享。Cloud Shell machines are temporary, but your files are persisted in two ways: through a disk image, and through a mounted file share named clouddrive. 首次启动时,Cloud Shell 会提示你代表你创建资源组、存储帐户和 Azure 文件共享。On first launch, Cloud Shell prompts to create a resource group, storage account, and Azure Files share on your behalf. 这是一个一次性步骤,将来会针对所有会话自动附加。This is a one-time step and will be automatically attached for all sessions. 单个文件共享可以映射,将由 Cloud Shell 中的 Bash 和 PowerShell 使用。A single file share can be mapped and will be used by both Bash and PowerShell in Cloud Shell.

详细了解如何装载新的或现有的存储帐户,或了解Cloud Shell 中使用的持久性机制Read more to learn how to mount a new or existing storage account or to learn about the persistence mechanisms used in Cloud Shell.

概念Concepts

  • Cloud Shell 在按会话按用户提供的临时主机上运行Cloud Shell runs on a temporary host provided on a per-session, per-user basis
  • Cloud Shell 在 20 分钟没有交互活动后将超时Cloud Shell times out after 20 minutes without interactive activity
  • Cloud Shell 需要装载 Azure 文件共享Cloud Shell requires an Azure file share to be mounted
  • Cloud Shell 对 Bash 和 PowerShell 使用相同的 Azure 文件共享Cloud Shell uses the same Azure file share for both Bash and PowerShell
  • 将针对每个用户帐户为 Cloud Shell 分配一台计算机Cloud Shell is assigned one machine per user account
  • Cloud Shell 使用文件共享中保存的 5-GB 映像持久保存 $HOMECloud Shell persists $HOME using a 5-GB image held in your file share
  • 在 Bash 中权限是按常规 Linux 用户设置的Permissions are set as a regular Linux user in Bash

详细了解 Cloud Shell 中的 BashCloud Shell 中的 PowerShell 的功能。Learn more about features in Bash in Cloud Shell and PowerShell in Cloud Shell.

定价Pricing

托管 Cloud Shell 的计算机是免费的,先决条件是具有已装载的 Azure 文件共享。The machine hosting Cloud Shell is free, with a pre-requisite of a mounted Azure Files share. 将收取常规存储费用。Regular storage costs apply.

后续步骤Next steps

Bash in Cloud Shell 快速入门Bash in Cloud Shell quickstart
Cloud Shell 中的 PowerShell 快速入门PowerShell in Cloud Shell quickstart