Google cloud shell – clean slate

 
 
Cloud computing today is a buzz world and very soon we will find almost all companies and small businesses opting for cloud resources. To encourage new users to try cloud services most cloud service providers provide free credits.
 
And as they say there is no better way to learn– except learning by making mistakes.
The question arises what to do if you happen to make a mistake in the cloud shell itself- the most important place if you have to move beyond the User Interface (UI).  
 
Imagine you were following a documentation- but as is usually the case- the documentation is (appears to be šŸ˜) written for pros- not for beginners- and you made a critical mistake-and worst you do not even know where it is or how to rectify it. Worry not we can wipe off the slate clean.
 
Let us see how to do it for Google Cloud Shell
 
  • Open the Google shell console by pressing the console button
  • Check the files in your HOME directory:
ls -a $HOME
  • Remove all the files from the HOME directory, you require super user privileges to do it, so useĀ sudoĀ and useĀ rfĀ flag to remove all files (forcefully remove even files you do not have permission to write) and folders (recursively):
sudo rm -rf $HOME
  • On the extreme right click on the three dots and select Restart Cloud Shell
  • Click on the Restart buttonĀ 
  • Viola the slate is clean. You are ready to experiment again.Ā Ā 

Leave a Comment