Fastest installation of Visual Studio Code on Ubuntu

Conclusion

$ 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.

Premise

--Use apt instead of snap or flatpak

Commentary

$ 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.

References

--Three ways to install VS Code on Ubuntu-- Qiita -[Quick solution] Install Ubuntu VS Code │ wonwon eater

Recommended Posts

Fastest installation of Visual Studio Code on Ubuntu
Installing Visual Studio Code on Ubuntu 20.04 (automatic update support)
I couldn't type Japanese in Ubuntu20.04 + Visual Studio Code
Ruby installation on WSL2 + Ubuntu 20.04
Java in Visual Studio Code
Installation of jenkins 2.60.1-1 0 or later fails on Ubuntu 14.04 (with grudges)
Use PlantUML with Visual Studio Code
Elmer / Ice installation (Ubuntu on WSL)
How to use PlantUML with Visual Studio Code (created on October 30, 2020)
Spring5 MVC Web application development with Visual Studio Code Environment construction (Installation of JDK11, Maven, Tomcat, Visual Studio Code)
A record of setting up a Java development environment with Visual Studio Code
Headless install of Ubuntu 20.10 on Raspberry Pi
Ruby on Rails in Visual Studio Codespaces
[For beginners] Introducing the procedure to Hello, World in C/C ++ language using Visual Studio Code on Ubuntu
[Mac] Install Java in Visual Studio Code
Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders
Experience .NET 5 with Docker and Visual Studio Code
Add --enable-preview option in Java in Visual Studio Code
Java.home cannot be set in visual studio code.
Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
Install the latest version of Jenkins on Ubuntu 16
[Mac] Install Java in Visual Studio Code (VS Code)
JDBC operation check from xampp installation on Ubuntu
tmux on Ubuntu
I can't input Japanese with VS code (Visual Studio Code) of Ubuntu 18.04.5! ?? If you want to download VS Code to Ubuntu, go to the official website! !!
[Ubuntu 20.04] Display the day of the week on the date / clock
Getting started with Java programs using Visual Studio Code
Try to quit Eclipse and switch to Visual Studio Code
Output settings to debug console in Visual Studio Code
Why can I develop Java with Visual Studio Code?
Installation of Oracle Database XE on CentOS7 (t2.micro instance)
Build Java program development environment with Visual Studio Code
[Ubuntu20.04] From ROS-noetic installation to SLAM simulation of turtlebot3