Table of Contents
Motivation
Using the Ubuntu 20.04 VM on Apple silicone (M1 / M2 / M3) you might have a hard time installing tools.
Here is a solution how to get a running VS Code installation.
Update Packages
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
Updating keys
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo rm microsoft.gpg
Adding repository
Here you need to add the repository for the arm64 architecture!
sudo add-apt-repository "deb [arch=arm64] https://packages.microsoft.com/repos/vscode stable main"
Install VS Code
sudo apt install code