Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Jika telah menginstal gcloud CLI, Anda dapat berinteraksi dengan Cloud Shell dari terminal dan menggunakannya sebagai sandbox serta lingkungan pengembangan portabel. Hal ini memberikan kemudahan dalam menggunakan resource Cloud Shell, baik untuk menguji operasi dengan cepat maupun menggunakan IDE pilihan Anda untuk mengedit file yang disimpan di instance Cloud Shell dari desktop lokal.
Gunakan gcloud cloud-shell
Penawaran grup perintah gcloud cloud-shell saat ini menyediakan fungsi
berikut:
Jika menggunakan Mac atau Linux, Anda dapat memasang direktori rumah Cloud Shell ke sistem file lokal setelah menginstal sshfs.
Dengan begitu, Anda dapat mengedit file di direktori beranda Cloud Shell menggunakan alat lokal pilihan Anda. Semua data dalam sistem file yang dipasang secara jarak jauh
disimpan di Persistent Disk
dan disimpan di seluruh sesi.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[],[],null,["# Use Cloud Shell with the gcloud CLI\n\nIf you have the [gcloud CLI installed](/sdk/install), you can interact\nwith Cloud Shell from your terminal and use it as a sandbox and a\nportable development environment. This provides the convenience of working\nwith Cloud Shell resources, whether to quickly test an operation\nor use an IDE of your choice to edit a file saved on your\nCloud Shell instance from your local desktop.\n\nUse `gcloud cloud-shell`\n------------------------\n\nThe current `gcloud cloud-shell` command group offering provides the following\nfunctionality:\n\n- Establishing an interactive SSH session with Cloud Shell using [`gcloud cloud-shell ssh`](/sdk/gcloud/reference/cloud-shell/ssh).\n- Copy files between your local and Cloud Shell machine via [scp](/sdk/gcloud/reference/cloud-shell/scp).\n- Mount your Cloud Shell directory to your local file system via [sshfs](/sdk/gcloud/reference/cloud-shell/get-mount-command).\n\nFor more detail, see the reference documentation for\n[`gcloud cloud-shell`](/sdk/gcloud/reference/cloud-shell).\n| **Note:** To propagate your credentials to your Cloud Shell when starting it from the Google Cloud CLI, use the [`--authorize-session`](/sdk/gcloud/reference/cloud-shell/ssh#--authorize-session) flag when running the `gcloud cloud-shell ssh` command.\n\nExample workflow\n----------------\n\nTo illustrate the workings of `gcloud cloud-shell`, here is an example of how\nyou can use these commands in practice:\n\n1. Start a SSH session:\n\n gcloud cloud-shell ssh\n\n2. Copy a file, `data.txt`, from Cloud Shell to your local machine:\n\n gcloud cloud-shell scp cloudshell:~/data.txt localhost:~data.txt\n\n3. If you're using Mac or Linux, you can mount your Cloud Shell home\n directory onto your local file system after installing\n [sshfs](https://github.com/libfuse/sshfs).\n\n This allows you to edit the files in your Cloud Shell home directory using\n your choice of local tools. All the data in your remotely mounted file\n system is stored on a [Persistent Disk](/persistent-disk)\n and stored across sessions. \n\n gcloud cloud-shell get-mount-command ~/my-cloud-shell"]]