How do I switch between CLI and Bash in the sandbox

Daniel Delmore 10 Reputation points
2023-03-25T18:15:44.81+00:00

Step 1 has me perform a step in CLI and Step 2 has me perform a step in Bash. How do I swap between the two?

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
942 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Abishek Samuel C 55 Reputation points
    2023-10-10T11:28:42.64+00:00

    Azure CLI to Bash:
    bash
    Bash to Azure CLI:
    pwsh

    11 people found this answer helpful.
    0 comments No comments

  2. Erkan Sahin 830 Reputation points
    2023-03-25T18:37:45.3266667+00:00

    You can switch between the Azure CLI and Bash by opening two separate terminal windows or tabs.

    In one window/tab, you can use the Azure CLI to perform Step 1, and in the other window/tab, you can use Bash to perform Step 2. You can switch between the two windows/tabs as needed to complete the steps.

    Alternatively, if you prefer to use only one window/tab, you can switch between the Azure CLI and Bash modes within the terminal.

    To switch from Azure CLI to Bash, you can simply type exit and press Enter. This will exit the Azure CLI mode and take you back to the Bash prompt.

    To switch from Bash to Azure CLI, you can type az followed by the command you want to run, and press Enter. This will activate the Azure CLI mode and you can run the command as usual.

    For example, to switch from Azure CLI to Bash, you can run:

    bash
    exit
    

    And to switch from Bash to Azure CLI, you can run:

    Copy
    az login
    

    Note that the exact commands you need to run may differ depending on your specific scenario.

    Hope this helps :-)

    3 people found this answer helpful.
    0 comments No comments

  3. TP 76,681 Reputation points
    2023-03-25T21:41:54.74+00:00

    Hi,

    You do not need to use Bash to complete the exercise. In both steps 1 & 2 you are using Azure CLI command.

    For Step 2, the command you enter uses the Custom Script Extension to run a Bash script on the VM that you created in Step 1. You don't need to do anything additional other than enter the az command--the extension will automatically download the bash script to the VM and then execute it.

    Since your sandbox has now expired you will need to activate a new one and then repeat Steps 1 & 2. Once you have completed that you should continue on because there is an exercise in a later unit that requires the VM you create in this unit.

    If the above was useful please click Accept Answer. If something is unclear or you need additional help please add a comment.

    Thanks.

    -TP

    1 person found this answer helpful.
    0 comments No comments

  4. kobulloc-MSFT 23,496 Reputation points Microsoft Employee
    2023-03-25T22:08:33.8033333+00:00

    Hello, @Daniel Delmore !

    Where am I seeing this?

    How do I switch between CLI and Bash in the sandbox?

    You can see how the exercise is intended to be completed for Task 1 and Task 2 in the screenshot below. Simply copy the commands as shown in the instructions and run them in the sandbox:

    User's image

    1 person found this answer helpful.
    0 comments No comments