sudo apt update
# install dependencies
sudo apt install software-properties-common apt-transport-https wget -y
# Import the GPG key provided by Microsoft to verify the package integrity.
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add
# Run the following command to add the Visual Studio Code repository to your system
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
# install vscode
sudo apt install code
# verify installation
code --version