gcloud cloud-shell get-mount-command Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud cloud-shell get-mount-command - prints a command to mount the Cloud Shell home directory via sshfs
- SYNOPSIS
gcloud cloud-shell get-mount-commandMOUNT_DIR[--force-key-file-overwrite][--ssh-key-file][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
gcloud cloud-shell get-mount-commandstarts your Cloud Shell if itis not already running, then prints out a command that allows you to mount theCloud Shell home directory onto your local file system usingsshfs.You must install and run sshfs yourself.After mounting the Cloud Shell home directory, any changes you make under themount point on your local file system will be reflected in Cloud Shell andvice-versa.
- EXAMPLES
- To print a command that mounts a remote directory onto your local file system,run:
gcloudcloud-shellget-mount-commandREMOTE-DIR - POSITIONAL ARGUMENTS
MOUNT_DIR- Local directory onto which the Cloud Shell home directory should be mounted.
- FLAGS
--force-key-file-overwrite- If enabled gcloud will regenerate and overwrite the files associated with abroken SSH key without asking for confirmation in both interactive andnon-interactive environment.
If disabled gcloud will not attempt to regenerate the files associated with abroken SSH key and fail in both interactive and non-interactive environment.
--ssh-key-file- The path to the SSH key file. By default, this is
~/.ssh/google_compute_engine.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- These variants are also available:
gcloudalphacloud-shellget-mount-commandgcloudbetacloud-shellget-mount-command
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.