DEV Community 👩‍💻👨‍💻


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- | gpg --dearmor >
install -o root -g root -m 644 /etc/apt/trusted.gpg.d/
# 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/] 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
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!