Search code examples
azurecdazure-cloud-shell

CD in Azure PowerShell Failure


In powershell cd works, but not in my Azure Cloud Shell. What am I missing?

Copied session shows me trying to get into quickstart directory (which was created in the powershell shell)

Welcome to Azure Cloud Shell

Type "az" to use Azure CLI 2.0
Type "help" to learn about Cloud Shell

MOTD: Switch to Bash from PowerShell: bash

VERBOSE: Authenticating to Azure ...
VERBOSE: Building your Azure drive …

Azure:/
PS Azure:\> ls -F
clouddrive@  quickstart/  test/

Azure:/
PS Azure:\> cd quickstart
cd : Cannot find path 'Azure:/quickstart' because it does not exist.
At line:1 char:1
+ cd quickstart
+ ~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Azure:/quickstart:String) 
                                           [Set-Location], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

Solution

  • You may use "cd $HOME/quickstart" to achieve it.

    For illustration please check below screenshot.

    enter image description here

    Hope this helps!! Cheers!! :)