How to edit files in Azure Cloud Shell

This post has been republished via RSS; it originally appeared at: ITOps Talk Blog articles.

 

Azure Cloud Shell is a great tool to manage your Azure resources directly within the Azure Portal, Microsoft Docs, the Azure Mobile App or shell.azure.com. With Azure Files you even get persistent storage, which you can use to store scripts, Azure Resource Manager (ARM) templates, files and other tools. Sometimes you want to make a quick change to one of the files you are using in the Azure Cloud Shell, for that the Azure Cloud Shell comes with text editors like vi, vim, nano, and emacs. However, my favorite editor in Cloud Shell is code. Code is an editor based on the Visual Studio Code open-source project Monaco. Monaco is the same web-standards based editor that powers Visual Studio Code, and the editor is now integrated directly into Cloud Shell.

 

Cloud-Shell-Editor.gif

 

To open files in code simple write:

 

code <filename>

For example:

 

code azureresourcemanager.json

You can also just open code in a specific folder:

 

code .

To save the file, you can simply click on the top right to save file or press CTRL + S. To close the editor you can again use the menu on the top right or press CTRL + Q.

 

I hope you this gives you a quick look at how you can edit files in Azure Cloud Shell. If you have any questions, let me know in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.