如何重置Google云端Shell环境

问题描述:

我正尝试重置我的云端硬盘。我正在删除项目并创建新项目,但将所有预先安装的文件都包含在同一个云外壳中。无论如何要完全重置。如何重置Google云端Shell环境

+0

没有程序这样做,但在这篇文章中所采用的方法可以帮助:http://stackoverflow.com/questions/36067968/如何重置google-cloud-shell-user-persistent-disk?rq = 1 – jarmod

+0

@jarmod,我已经试过了,很遗憾没有回复支持 – BruceWayne

+0

可能重复[如何重置Google Cloud Shell用户永久磁盘? ](https://stackoverflow.com/questions/36067968/how-to-reset-google-cloud-shell-user-persistent-disk) –

似乎没有办法手动重置云壳。根据文档,云外壳虚拟机在闲置一小时后终止。你可能想杀死你的会议为生效:

Cloud Shell Doc

但请记住,云外壳并不意味着是一个完全成熟的机器。它更适用于测试和启动ad-hoc gcloud和gsutil命令。

因此,最好为您的开发目的创建一个新的云计算实例,而不是使用云Shell。

是有

Restore your Cloud Shell home directory to a clean state: 

Check for personal files in the home directory: 
    ls -a $HOME 
Remove all files from your home directory: 
    sudo rm -rf $HOME 
In the Cloud Shell menu, click the gear icon, then click Restart Cloud Shell. Click Restart Cloud Shell in the confirmation dialog. 

从文档https://cloud.google.com/shell/docs/limitations#resetting_cloud_shell_to_default_state