Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
停用或重置 Cloud Shell
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页面介绍了如何为受管理的用户的账号停用 Cloud Shell,以及如何重置 Cloud Shell。
为受管理的用户账号停用 Cloud Shell
如需为 Google Workspace 和 Cloud Identity 受管理的用户账号停用 Cloud Shell,请前往 Google 管理控制台,然后依次前往应用 > 其他 Google 服务 > Google Cloud Platform > Cloud Shell 设置,最后停用 Cloud Shell 访问设置。
如需为特定用户停用 Cloud Shell,您需要使用访问权限群组:将各个用户添加到群组中,然后关闭该群组的 Cloud Shell 访问权限设置。如需了解详情,请参阅控制组织中的哪些人可以使用 Google Cloud 指南。
重置 Cloud Shell
如需重置 Cloud Shell 并将 Cloud Shell 主目录恢复到干净状态,请按以下步骤操作。
要将您的 Cloud Shell 主目录恢复到默认状态,请执行以下操作:
检查主目录中是否有个人文件,并注意下一步会删除这些文件:
ls -a $HOME
移除主目录中的所有文件:
sudo rm -rf $HOME
在 Cloud Shell 菜单中,依次点击 more_vert 更多和 power_settings_new 重新启动。
如果系统提示,请在确认对话框中点击重启。
系统会预配一个新的虚拟机,并将主目录恢复到默认状态。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-03-21。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2026-03-21。"],[],[]]