Question

Difficulty: HardAzure Portal, CLI, PowerShell, and Cloud Shell

An administrator frequently switches between the Bash and PowerShell environments in Azure Cloud Shell to execute scripts. Is the following statement true or false?

Switching the shell environment from Bash to PowerShell within Azure Cloud Shell automatically deletes all files stored in the user's home directory because the two environments mount separate Azure Files shares.

Answer: Answer

Answer

The statement is false.
The statement is false because Azure Cloud Shell uses a single persistent Azure Files share for a given user profile, preserving the home directory across both Bash and PowerShell environments.

Step-by-Step Solution

1
Analyze the storage behavior of Azure Cloud Shell.
Cloud Shell requires an Azure Files share to persist files across sessions.
To understand how files are kept between different sessions.
2
Evaluate the impact of switching environments (Bash vs. PowerShell).
Both environments run in separate container instances but mount the exact same Azure Files share.
To determine if files in the home directory are shared and accessible.
3
Determine the validity of the statement.
Files in the home directory are preserved, meaning the statement is false.
To finalize the answer.

Key Concept

Azure Cloud Shell persistent storage and environment behavior
Estimated Time:1m 30s
Rate this question