Hi,
You need to ssh to the vm you created before you can use sudo. Please see instructions below to complete the exercise.
Please activate new sandbox and create the VM as instructed in the exercise. After Task 1 finishes, make a note of the publicIpAddress that was assigned to the VM (e.g. 20.245.72.52). Start Task 2, and then when it errors out, follow steps below:
Connect to the newly-created VM using ssh (in cloud shell). You will need to substitute the publicIpAddress you noted above for <VM public ip address> below:
ssh azureuser@<VM public ip address>
Enter yes when you are prompted.
Copy and right-click -- paste the following three commands below in the cloud shell window. Wait for each to complete before pasting in the next command.
sudo apt-get update
sudo apt-get install -y nginx
echo "<html><body><h2>Welcome to Azure! My name is $(hostname).</h2></body></html>" | sudo tee -a /var/www/html/index.html
Performing the steps above should only add a couple of minutes to the process. Continue on in the module. If you have any questions please let me know in a comment.
If this was helpful to you please Accept Answer.
Thanks.
-TP