Ok, folks. Pushing the limits (of my understanding), I've broken my Google Cloud Shell on Google Cloud Platform. I can no longer open a shell session.
When I click the shell icon >_
on the tool bar, the shell opens on the lower half of the screen for a moment, stating it is provisioning the instance (if it has been over an hour), established a connection, and then poof, it closes.
I was able to time a screen capture just right to see the following:
Welcome to Cloud Shell! For help, visit https://cloud.google.com/cloud-shell/help.
-bash: /usr/bin/zsh: No such file or directory
I am pretty sure this relates to a naive attempt to install zsh ON A DIFFERENT PROJECT. My theory is that the 5Gb of persistent disk storage provided by Cloud Shell is per user, not per user per project. Therefore, my home directory is borked and will no longer load because the OS modifications are not persisted, only user home directories, and my .bashrc
now references non-existent files.
So my question is this: How do I start over, or wipe out the existing persistent disk and settings to obtain a working Shell again?
Resolved, with help from Google.
Note: This approach of obtaining help is likely not the best way long term.
I used the Shell's 'Send Feedback' feature to communicate the issue to Google.
An engineer on the Google Cloud Shell team was awesome, and replied with the following:
Fortunately, I didn't have anything important, nor sensitive, and replied with the delete option. Back in business.
Hope this helps someone else.
I actually was wondering about the same thing myself the other day. As you figured out, the Cloud Shell persistent disk is per user and as far as I know, there's no way to reset your persistent disk.
Just do
sudo su -
which will make you theroot
user.Then just remove/uninstall anything you added/installed. Ex:
rm /home/your_user/.bashrc
If you are unable to login because you messed up your
.bashrc
or something, it will prompt you to signin as root and then you can remove things with the command above.You can reset the cloud shell like this
From the docs https://cloud.google.com/shell/docs/limitations#resetting_cloud_shell_to_default_state