Is it possible to get a completely new instance of

2019-06-08 00:12发布

问题:

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.