add software source
add key
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
add source
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
update & install
update
apt update
install
apt install -y code