How to install vscode in ubuntu using terminal?

Member

by jewel , in category: Installation & Upgrades , 2 years ago

How to install vscode in ubuntu using terminal?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by kaley , a year 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


by keegan.towne , 7 months ago

@jewel 

Note: These instructions are for the amd64 architecture. If you're using a different architecture, replace "amd64" in the commands above with your architecture (e.g. "arm64").


If you encounter any issues during the installation process, refer to the official Visual Studio Code documentation for troubleshooting tips.