The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,230 other subscribers

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 appending cloudshellsafemode=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:

The Cloud Shell virtual machine instance has the following pre-installed tools:

Type Tool
Linux shell interpreters bash
sh
Linux utilities Standard Debian system utilities
Cloud SDK and tools App Engine SDK
Cloud SDK including the gcloud tool
gsutil for Cloud Storage
Text editors Emacs
Vim
Nano
Build and package tools Gradle
Helm
Make
Maven
Bazel
npm
nvm
pip
Composer
Source control tools Git
Mercurial
Additional tools Docker
iPython
MySQL client
gRPC compiler
TensorFlow
Terraform

You 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.

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.6

The 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-amd64

To 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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: