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 provides 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 by clicking below.

使用 Cloud Shell 圖示,從 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 使用者可在 Cloud Shell 中使用 Bash,Windows 使用者則可在 Cloud Shell (預覽) 中從 Shell 下拉式清單使用 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

Cloud Shell 由 Microsoft 管理,因此隨附受歡迎的命令列工具和語言支援。Cloud Shell is managed by Microsoft so it comes with popular command-line tools and language support. Cloud Shell 也可安全地自動驗證,讓您可透過 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.

檢視安裝在 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 2.0 或 Azure PowerShell 順暢地部署,即可建立和編輯設定。Simply create and edit configuration files by running code . for seamless deployment through Azure CLI 2.0 or Azure PowerShell.

深入了解 Cloud Shell 編輯器Learn more about the Cloud Shell editor.

多個存取點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 機器是暫存的,因此需要將 Azure 檔案共用掛接為 clouddrive,才能保存您的檔案。Cloud Shell machines are temporary and require an Azure Files share to be mounted as clouddrive to persist your files.

第一次啟動時,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 (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.


下拉式清單會針對您預先指派的 Cloud Shell 區域和 LRS/GRS/ZRS 儲存體帳戶進行篩選。Dropdowns are filtered for your pre-assigned Cloud Shell region and LRS/GRS/ZRS 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
  • Cloud Shell 會使用檔案共用中所保有的 5 GB 映像來保存 $HomeCloud Shell 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