$ sudo apt install -y apt-transport-https \
echo -e "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list \
wget -O - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - \
sudo apt update \
sudo apt install -y code
I used to download the .deb file from the official website and install it, but it's annoying, so I checked if it could be installed via PPA. There seem to be various methods, but if the public key is in .asc format, I think it is not necessary to convert it to .gpg format.
--Use apt instead of snap or flatpak
$ sudo apt install -y apt-transport-https
Since Microsoft's PPA is https, it seems necessary to include a package called apt-transport-https
.
$ echo -e "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
Create a PPA file. Use the tee
command instead of redirection due to file location permissions.
$ wget -O - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Get the public key and add it to apt. All you have to do is update the package list and install.
--Three ways to install VS Code on Ubuntu-- Qiita -[Quick solution] Install Ubuntu VS Code │ wonwon eater
Recommended Posts