Skip to content

Instantly share code, notes, and snippets.

@protrolium
Last active August 4, 2021 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save protrolium/64027b2c4ba6d4e8167ef51afe73f878 to your computer and use it in GitHub Desktop.
Save protrolium/64027b2c4ba6d4e8167ef51afe73f878 to your computer and use it in GitHub Desktop.
gcloud shell commands

GCP Cloudshell

$ gcloud projects list

troubleshoot ssh
$ gcloud alpha compute ssh "tikapi" --zone=us-west2-a --troubleshoot

$ gcloud compute config-ssh

initialize configuration
$ gcloud init

set ssh for project vim instance
$ sudo gcloud compute config-ssh --project "tikapi-321803"

mount a bucket to cloud shell
$ mkdir -p ./mount-point
$ gcsfuse --implicit-dirs [name of bucket] ./mount-point/

unmount
$ fusermount -u /path/to/mount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment