To create a persistent state in Cloud Shell, which file would you configure?.profile.bashrc.my_variables.config
Question
To create a persistent state in Cloud Shell, which file would you configure?
- .profile
- .bashrc
- .my_variables
- .config
Solution
To create a persistent state in Cloud Shell, you would configure the .bashrc
file. Here are the steps:
- Open Cloud Shell on your Google Cloud Console.
- In the Cloud Shell, type
cd ~
to navigate to your home directory. - Type
ls -a
to list all files, including hidden ones. You should see the.bashrc
file in the list. - Open the
.bashrc
file in a text editor. You can use nano or vim. For example, typenano .bashrc
. - Add the configurations you want to persist in the Cloud Shell session to the
.bashrc
file. - Save and close the file. If you used nano, you can do this by pressing
Ctrl + X
, thenY
to confirm saving changes, and thenEnter
to confirm the file name. - The changes you made to the
.bashrc
file will now persist across Cloud Shell sessions.
Similar Questions
What is the way to store local variables that can be accessed within the application?(1 Point)Using Config fileUsing app.storageUsing app.localsUsing database
In Linux, what does the PS1 environment variable control?*1 pointa) System passwordb) Shell promptc) Disk spaced) User profile
Local variables are stored in an area called ___________OptionsPermanent storage areaHeapFree memoryStack
Which of the following can be used for declaring the deployment configurations in GCP? a) XML b) YML c) XAL d) YAML
rrect answerThe storage area for auto variableOptionscacheprocessor registermain memoryvirtual
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.