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. 它可讓您彈性地選擇最適合您工作方式的殼層體驗 (Bash 或 PowerShell)。It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell.

按一下下列項目,從 嘗試。Try from by clicking below.

內嵌啟動Embed launch

使用 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

使用者可以選擇 Bash 或 PowerShell。Users can choose between Bash or PowerShell.

  1. 選取 [ Cloud Shell]。Select Cloud Shell.

    Cloud Shell 圖示

  2. 選取 [ Bash ] 或 [ PowerShell]。Select Bash or PowerShell.

    選擇 [Bash] 或 [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.

與 整合Integrated with

您可以直接從上裝載的文件使用 Cloud Shell。You can use Cloud Shell directly from documentation hosted on 它整合在 Microsoft LearnAzure PowerShellAzure CLI documentation 中 - 按一下程式碼片段中的 [試試看] 按鈕,即可開啟沈浸式殼層體驗。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.


Cloud shell 儲存體帳戶不支援 Azure 儲存體防火牆。Azure storage firewall is not supported for cloud shell storage accounts.


  • 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.


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