How to connect my cloudshell bash to azure storage space instead of local computer environment?

sid 45 Reputation points
2023-12-23T07:13:50.1933333+00:00

I have tried using az login to connect with the azure development environment where I can start building my AI project but it is not connecting to the cloud storage instead it is connected with my Ubuntu directory on PC. Please suggest!

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,441 questions
Microsoft Intune Linux
Microsoft Intune Linux
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Linux: A family of open-source Unix-like operating systems.
42 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,089 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ravi Kanth Koppala 3,231 Reputation points Microsoft Employee
    2023-12-24T02:47:55.0866667+00:00

    @sid

    To connect your Azure Cloud Shell to an Azure Storage account, you can use the az storage blob upload command. Here are the steps to follow:

    1. Log in to your Azure account using the az login command.
    2. Once you are logged in, create a storage account using the az storage account create command.
    3. Create a container within the storage account using the az storage container create command.
    4. Upload a file to the container using the az storage blob upload command.

    Here is an example command to upload a file to a container within a storage account:

    az storage blob upload --account-name mystorageaccount --account-key 00000000 --container-name mycontainer --type block --file /path/to/local/file --name myfile

    Replace mystorageaccount with the name of your storage account, 00000000 with your account key, mycontainer with the name of your container, /path/to/local/file with the path to the file you want to upload, and myfile with the name, you want to give the file in the container.


    References:

    AI Note: This answer is generated using the Microsoft Q&A AI Assist.

    1 person found this answer helpful.