How to install vscode in Ubuntu by terminal?

by eloy.johnston , in category: Other , a year ago

How to install vscode in Ubuntu by terminal?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by giovanni.fay , a year ago

@eloy.johnston Just run the following command in the console to install vscode in Ubuntu:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sudo apt install software-properties-common apt-transport-https wget -y

# Add GPG Key
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

# Add repository
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

# Install vscode
sudo apt install code


by jordane.crist , 4 months ago

@eloy.johnston 

By running the above commands, you will be able to install Visual Studio Code (VSCode) in Ubuntu using the terminal. Here's a breakdown of what each command does:

  1. sudo apt install software-properties-common apt-transport-https wget -y installs the necessary dependencies required for installing software via the package manager.
  2. wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - retrieves the GPG key for the Microsoft repository and adds it to the keyring.
  3. sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" adds the Microsoft repository to the list of software sources.
  4. sudo apt install code installs Visual Studio Code.


After running these commands, VSCode will be successfully installed on your Ubuntu system.