Install the VS Code editor on Ubuntu

  • Run following curl command to download Microsoft GPG key

# curl | gpg –dearmor > microsoft.gpg

  • Then install the key via command:

# sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

  • Add the VS Code repository to your system by running the command:

# sudo sh -c ‘echo “deb [arch=amd64] stable main” > /etc/apt/sources.list.d/vscode.list’

  • Install the VS Code editor by running the commands below in terminal:

# sudo apt update
# sudo apt install code