I accidentally deleted some configuration files, and now the terminal no longer displays my_name@project_name:~$
, but my_name@some_instance:~$
. Is there a way to get a completely new instance for Cloud Shell?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can get your Cloud Shell home directory into clean state as follows:
- Run
ls -a $HOME
and make sure you don't have any files you care about. - Run
sudo rm -rf $HOME
to delete the home directory. - In Cloud Shell menu, click the gear icon, then click "Restart Cloud Shell". Click "Restart Cloud Shell" in the dialog to confirm the action.
- Wait until the new VM is provisioned. This may take a couple minutes. Since your home directory does not exist, the directory and the default configuration files will be recreated.
- You should be good now.