Sherif eldeeb
Sherif eldeeb

Reputation: 2186

customizing environments in Google cloud shell

I want to customize Google cloud shell, so I made some changes to these files:

$HOME/.customize_environment
/etc/profile.d/init_help.sh
/google/devshell/bashrc.google

but when I restart the shell, only the first file keeps it's changes, but the other two files reset to their original content (may be because there are outside of $HOME dir).

how can I make a perminant change to these files?

Upvotes: 0

Views: 667

Answers (1)

Donnald Cucharo
Donnald Cucharo

Reputation: 4126

You are correct on your guess when you say that other files not located at $HOME resets when the shell restarts. As discussed in the comments, only files located at $HOME can be modified and persisted between sessions. It is well documented in GCP docs:

Cloud Shell provisions 5 GB of free persistent disk storage mounted as your $HOME directory. All files you store in your home directory, including installed software, scripts and user configuration files like .bashrc and .vimrc, persist between sessions. Since your .bashrc persists across sessions, it's a great way to customize your Cloud Shell behavior. Similarly, you can install packages into your home directory to have your installations persist.

Upvotes: 3

Related Questions