Google Cloud Shell: tools, languages and “safe mode”
Posted by jpluimers on 2023/01/19
After publishing Free Linux cloud shell for Gmail users – shell in the browser that works in all locations I’ve been so far, the Google Cloud Shell got extended quite a bit.
There is now [Wayback/Archive] Safe Mode (which skips initialisation scripts):
If there’s a problem in your
.bashrc
or.tmux.conf
files, Cloud Shell immediately close after connection. To resolve this, open Cloud Shell in safe mode by appendingcloudshellsafemode=true
to the URL. This restarts your Cloud Shell instance and logs you in as root, allowing you to fix any issues in the files.To permanently delete all files in your home directory and restore your Cloud Shell home directory to a clean state, you can reset your Cloud Shell VM.
And there is support for way more [Wayback/Archive] tools and languages:
Available tools
The Cloud Shell virtual machine instance has the following pre-installed tools:
Type Tool Linux shell interpreters bash
shLinux utilities Standard Debian system utilities Cloud SDK and tools App Engine SDK
Cloud SDK including thegcloud
tool
gsutil
for Cloud StorageText editors Emacs
Vim
NanoBuild and package tools Gradle
Helm
Make
Maven
Bazel
npm
nvm
pip
ComposerSource control tools Git
MercurialAdditional tools Docker
iPython
MySQL client
gRPC compiler
TensorFlow
TerraformYou can install additional software packages on the virtual machine instance but the installation will not persist after the instance terminates unless you install the software in your
$HOME
directory or create a custom environment.Language support
The Cloud Shell virtual machine instance provides pre-installed language support for the following:
Language Version Java JRE/JDK 1.8 and 11 Go 1.13 Python 2.7.13 Node.js v10.14.2 Ruby 2.6.0 PHP 7.0.33 .NET Core SDKs 2.0.0 and 2.1.502
Core runtimes 2.0.0 and 2.1.6The default version of the Java environment is 11. To change the current Cloud Shell session to use version 1.8 of the JRE and JDK, enter the following at the Cloud Shell command prompt:
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64 && export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64To change back to 11:
sudo update-java-alternatives -s java-1.11.0-openjdk-amd64 && export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/jre
–jeroen
Leave a Reply