How to install vscode in ubuntu using terminal?

Member

by jewel , in category: Installation & Upgrades , a year ago

How to install vscode in ubuntu using terminal?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by kaley , 9 months ago

@jewel 

To install Visual Studio Code on Ubuntu using the terminal, follow these steps:

  1. First, update the package manager index by running the following command:
1
sudo apt update


  1. Next, install the GPG key for the official Visual Studio Code repository by running the following command:
1
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg


  1. Add the Visual Studio Code repository to your system by running the following command:
1
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'


  1. Update the package manager index again by running the following command:
1
sudo apt update


  1. Finally, install Visual Studio Code by running the following command:
1
sudo apt install code


This will install Visual Studio Code on your Ubuntu system. You can then launch Visual Studio Code by searching for it in the application launcher or by running the following command in the terminal:

1
code