是否有可能获得一个全新的Google Cloud Shell实例? [英] Is it possible to get a completely new instance of Google Cloud Shell?
本文介绍了是否有可能获得一个全新的Google Cloud Shell实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不小心删除了一些配置文件,现在终端不再显示my_name@project_name:~$
,而是显示my_name@some_instance:~$
.有没有办法为Cloud Shell获取全新实例?
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?
推荐答案
您可以将Cloud Shell主目录设置为干净状态,如下所示:
You can get your Cloud Shell home directory into clean state as follows:
- 运行
ls -a $HOME
并确保您没有任何文件在意. - 运行
sudo rm -rf $HOME
删除主目录. - 在Cloud Shell菜单中,单击齿轮图标,然后单击重新启动Cloud Shell".在对话框中单击重新启动Cloud Shell"以确认操作.
- 等待,直到配置了新的VM.这可能需要几分钟.由于您的主目录不存在,因此将重新创建目录和默认配置文件.
- 你现在应该很好.
- 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.
这篇关于是否有可能获得一个全新的Google Cloud Shell实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文