DEV Community 👩‍💻👨‍💻

abbazs
abbazs

Posted on • Updated on

How to install vscode in ubuntu using apt-get?

To install vscode using apt-get:

# login to a shell as super user
sudo su
# Get the gpg key from microsoft
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
rm packages.microsoft.gpg
# Create a file called vscode.list in /etc/apt/sources.list.d and add reference url
sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# Install dependency packages
apt update && apt install apt-transport-https
# Install vscode 
apt install code
# Exit root shell
exit
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Hacktoberfest is happening now!



It is a month-long celebration of open source. For a lot of devs, its their introduction to open source.


Check out the Hacktoberfest tag on DEV to keep up with the latest!