Azure Cloud Shell 的概觀Overview of Azure Cloud Shell

Azure Cloud Shell 是可經由瀏覽器存取的互動式殼層,應用在 Azure 資源管理上。Azure Cloud Shell is an interactive, browser-accessible shell for managing Azure resources. 它可讓您彈性地選擇最適合您工作方式的殼層體驗。It gives you the flexibility of choosing the shell experience that best suits the way you work. Linux 使用者可以選擇 Bash 體驗,而 Windows 使用者可以選擇 PowerShell。Linux users can opt for a Bash experience, while Windows users can opt for PowerShell.

請嘗試從 使用此按鈕。Try from using this button.

請嘗試從 Azure 入口網站使用的雲端殼層圖示。Try from Azure portal using the Cloud Shell icon.



以瀏覽器為基礎的體驗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.

選擇慣用的殼層體驗Choice of preferred shell experience

Linux 使用者時可以使用 Bash 雲端殼層中的 Windows 使用者可以在雲端介面 (預覽) 中使用 PowerShell 從殼層下拉式清單。Linux users can use Bash in Cloud Shell, while Windows users can use PowerShell in Cloud Shell (Preview) from the shell dropdown.

Cloud Shell 中的 Bash

Cloud Shell 中的 PowerShell (預覽)

驗證及設定 Azure 工作站Authenticated and configured Azure workstation

由 Microsoft 管理雲端 Shell,讓它隨附常用的命令列工具和語言支援。Cloud Shell is managed by Microsoft so it comes with popular command-line tools and language support. 雲端殼層也安全地讓您立即存取您的資源,透過 Azure CLI 2.0 或 Azure PowerShell cmdlet 自動驗證。Cloud Shell also securely authenticates automatically for instant access to your resources through the Azure CLI 2.0 or Azure PowerShell cmdlets.

檢視 Bash 經驗PowerShell (預覽) 經驗的完整工具清單。View the full tooling list for the Bash experience and PowerShell (Preview) experience.

多個存取點Multiple access points

雲端殼層是有彈性的工具,可以從使用:Cloud Shell is a flexible tool that can be used from:

連線 Microsoft Azure 檔案儲存體Connect your Microsoft Azure Files storage

雲端殼層電腦是暫時性的而且需要 Azure 檔案共用,以裝載為clouddrive保存您的檔案。Cloud Shell machines are temporary and require an Azure Files share to be mounted as clouddrive to persist your files.

第一次啟動雲端殼層會提示您建立資源群組、 儲存體帳戶和 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 (Preview).

建立新的儲存體Create new storage

系統可代替您建立本地備援儲存體 (LRS) 帳戶和「Azure 檔案」共用。A locally-redundant storage (LRS) account and Azure Files share can be created on your behalf. 如果您選擇同時使用 Bash 和 PowerShell 環境,「Azure 檔案」共用就會同時用於這兩個環境。The Azure Files share will be used for both Bash and PowerShell environments if you choose to use both. 所需成本和一般儲存體相同。Regular storage costs apply.

將代替您建立下列三個資源:Three resources will be created on your behalf:

  1. 名稱如下的資源群組:cloud-shell-storage-<region>Resource Group named: cloud-shell-storage-<region>
  2. 名稱如下的儲存體帳戶:cs<uniqueGuid>Storage Account named: cs<uniqueGuid>
  3. 名稱如下的檔案共用:cs-<user>-<domain>-com-<uniqueGuid>File Share named: cs-<user>-<domain>-com-<uniqueGuid>


Cloud Shell 中的 Bash 也會建立預設 5-GB 磁碟映像來保存 $HomeBash in Cloud Shell also creates a default 5-GB disk image to persist $Home. $Home 目錄中的所有檔案 (例如 SSH 金鑰) 會都保存於已掛接之 Azure 檔案共用中儲存的使用者磁碟映像中。All files in your $Home directory such as SSH keys are persisted in your user disk image stored in your mounted Azure file share. 在 $Home 目錄和已掛接的 Azure 檔案共用中儲存檔案時,請套用最佳做法。Apply best practices when saving files in your $Home directory and mounted Azure file share.

使用現有的資源Use existing resources

提供進階選項,將現有資源與 Cloud Shell 建立關聯。An advanced option is provided to associate existing resources to Cloud Shell. 在儲存體設定提示中,按一下 [顯示進階設定] 以顯示其他選項。At the storage setup prompt, click "Show advanced settings" to show additional options.


下拉式清單會對您的預先指派的雲端殼層地區和 LRS/GRS 的儲存體帳戶篩選。Dropdowns are filtered for your pre-assigned Cloud Shell region and LRS/GRS storage accounts.

了解 Cloud Shell 儲存體、更新 Azure 檔案共用,以及上傳/下載檔案。Learn about Cloud Shell storage, updating Azure file shares, and uploading/downloading files.


  • 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 會將相同的 Azure 檔案共用同時用於 Bash 和 PowerShellCloud Shell uses the same Azure file share for both Bash and PowerShell
  • Cloud Shell 會以一台機器、一個使用者帳戶的方式指派Cloud Shell is assigned one machine per user account
  • Bash 持續發生 $Home 使用 5 GB 映像存放在檔案共用Bash persists $Home using a 5-GB image held in your file share
  • 權限設定為一般 Linux 使用者 (採用 Bash)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 (Preview).


裝載 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

Cloud Shell 中 Bash 的快速入門Bash in Cloud Shell quickstart
Cloud Shell (預覽) 中的 PowerShell 快速入門PowerShell in Cloud Shell (Preview) quickstart