Disable or reset Cloud Shell (original) (raw)

This page describes how to disable Cloud Shell for managed user accounts and how to reset Cloud Shell.

Disable Cloud Shell for managed user accounts

To disable Cloud Shell forGoogle Workspace andCloud Identitymanaged user accounts, go to the Google Admin console and then navigate toApps > Additional Google services > Google Cloud Platform >Cloud Shell Settingsand disable Cloud Shell Access Settings.

To disable Cloud Shell for specific users, you'll need to use access groups: add individual users to the group and turn off the group's Cloud Shell access setting. For more information, seeControlling who uses Google Cloud in your organization guide.

To reset Cloud Shell and restore your Cloud Shell home directory to a clean state, follow these steps.

To restore your Cloud Shell home directory to a clean state:

  1. Check for personal files in the home directory and note that the next step deletes these files:
    ls -a $HOME
  2. Remove all files from your home directory:
    sudo rm -rf $HOME
  3. In the Cloud Shell menu, clickMore and then clickRestart. If prompted, click Restart in the confirmation dialog.
    This provisions a new VM and restores the home directory to its default state.