Steps To Install Visual Studio Code in Azure Virtual Machine

To install Visual Studio Code on an Azure Virtual Machine (VM), you can follow these steps:

Requirement:

  • Ensure you have access to an Azure account and the necessary permissions to create and manage VMs.
  • Do you have an existing VM in Azure or are you prepared to create a new one?

Now let’s say you have both an Azure account and valid permissions, now just follow these steps to install visual code or any piece of software in the Azure virtual machine.

1. Create or Access an Azure VM

If you already have a VM, you can skip this step. If you need to create a new one follow these steps:

  • Using Azure Portal
  • Go to the Azure portal.
  • Navigate to “Virtual machines”.
  • Click on create

  • Follow the prompts to create a new VM, here you can customize h/w for your system, storage,location etc.
  • Choose the desired OS (Windows or Linux) and click on create, firstly it will perform validation checks.
  • After validation is passed we can deploy our VM on a single click.

Using Azure CLI:

az vm create --resource-group MyResourceGroup --name MyVM --image UbuntuLTS --admin-username azureuser --generate-ssh-keys

2. Connect to Your VM

For Windows VM:

  • Use Remote Desktop Protocol (RDP) to connect to your Windows VM.

Connecting to VM using Windows RDP:

  • Open your RDP using windows search.
  • Type in public ip address of virtual machine.
  • Ensure that inbound rule allowing TCP traffic on port 3389 you can check this using “Networking” options available in options.
  • Type in username and you will be prompted to enter password enter it.
  • Then you will be connected to your azure virtual machine.

For Linux VM:

Use SSH to connect to your Linux VM.

Open a terminal and use the following command:

ssh azureuser@your-vm-ip

3.Use Vm for Installation

For Windows:

Now just download visual studio code like you would in your windows pc and install it by following steps of installation.

Now you can use VS Code in your Azure VM.

For Linux OS:

Now if you are using Linux OS then you can follow these to install vs code on it:

  • Update the package list and install dependencies:
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
  • Import the Microsoft GPG key:
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
  • Enable the Visual Studio Code repository:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
  • Update the package list and install Visual Studio Code:
sudo apt update
sudo apt install code
  • Now you can open VS Code on your linux OS.

How to Install Visual Studio Code in Azure Virtual

Visual Studio Code (VS Code) is a powerful, open-source code editor beloved by developers for its versatility, customization options, and extensive plugin ecosystem. But what if your development needs to extend to the cloud? Azure virtual machines provide a scalable and secure environment in which to run your applications. The good news is, you can leverage the power of VS Code directly within your Azure VM. This guide will walk you through the installation process, empowering you to develop and manage your cloud-based projects seamlessly within the familiar VS Code interface.

Similar Reads

Steps To Install Visual Studio Code in Azure Virtual Machine

To install Visual Studio Code on an Azure Virtual Machine (VM), you can follow these steps:...

Install Visual Studio Code in Azure Virtual – FAQs

Which installation method is best for my VM?...

Contact Us