[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-18 (世界標準時間)。"],[],[],null,["# Use Cloud Shell\n\nThis page describes how to start and set up a new Cloud Shell session.\n\nStart a new session\n-------------------\n\nClick\n**Activate Cloud Shell** at the top of the Google Cloud console.\n\nA Cloud Shell session opens inside a new frame at the bottom of the\nGoogle Cloud console and displays a command-line prompt. It can take a few\nseconds for the session to be initialized.\n\n### Use the terminal\n\nCloud Shell provides command-line access to the virtual machine\ninstance in a terminal window that opens in the Google Cloud console.\n\nIn addition to accessing the [Google Cloud CLI](/sdk/gcloud) and other\nutilities from the command line, you can use the `cloudshell` command to launch\ntutorials, open the Cloud Shell Editor, and download files.\n\nRefer to the guide on using the\n[Cloud Shell Terminal](/shell/docs/use-cloud-shell-terminal)\nfor more details.\n\n### Use the Cloud Shell Editor\n\nThe built-in code editor provides the convenience of viewing and editing files\nin the same environment where projects are built and deployed. Launch the Cloud Shell Editor by clicking\n\n**Open Editor** on the toolbar of the Cloud Shell window.\n\nFor more information, see\n[Cloud Shell Editor interface overview](/shell/docs/editor-overview).\n\n### Choose ephemeral mode\n\nBy default, Cloud Shell provisions 5 GB of free persistent disk\nstorage on your temporarily allocated virtual machine. This is your `$HOME`\ndirectory. When you use the default Cloud Shell experience, the\nfiles in your home directory persist between sessions.\n\nIf you do not need persistent storage, use Cloud Shell in ephemeral\nmode. In ephemeral mode, you can get started with Cloud Shell\nfaster because there is less set up and there is no disk attachment or archive.\nHowever, this means that all the files you create during your ephemeral mode\nsession are deleted with the VM when the session ends.\n\nTo choose ephemeral mode, append `ephemeral=true` to the\n`https://shell.cloud.google.com` URL. For example:\n`https://shell.cloud.google.com/?ephemeral=true`.\n\nThis does not work for `https://console.cloud.google.com` URLs.\n\nAlternatively, you can open the Cloud Shell\n**More** menu, select **Ephemeral\nmode** , and click **Save**.\n\nTo set ephemeral mode as your Cloud Shell default, enable **Always\nstart Cloud Shell in ephemeral mode** before you click **Save**.\n\n### Adjust the display window\n\nTo adjust the display window:\n\n1. Click **Hide** or\n **Restore**\n to hide or restore the session display.\n\n2. Click\n **Open Session in New Window** to detach the session as a new window.\n\n3. To close the detached window and re-open the session in the\n Google Cloud console, click\n\n **Activate Cloud Shell** at the top of the\n Google Cloud console window.\n\n4. To toggle between themes, click\n **Settings** and\n then click **Switch to Light Theme** or **Switch to Dark Theme**.\n\nWhat's next\n-----------\n\nNow that you're familiar with configuring Cloud Shell, you can\nstart to use the\n[pre-installed tools and commands](/shell/docs/how-cloud-shell-works#tools) from\nthe command line. You can also install additional tools in your\n[home directory](/shell/docs/how-cloud-shell-works#persistent_disk_storage) in\npersistent disk storage as needed.\n\n- [Learn how to use web preview](/shell/docs/using-web-preview)\n- [Explore examples of things you can do in Cloud Shell](/shell/docs/quickstart)"]]