Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ciamac-da/078e5e1fddbd9b963326e716898e287a to your computer and use it in GitHub Desktop.
Save ciamac-da/078e5e1fddbd9b963326e716898e287a to your computer and use it in GitHub Desktop.
Install-or-update-vscode(Visual Studio Code)-on-debian
#installing vscode on Debian
You can install vscode using following commands:
1- Start by updating the packages index and installing the dependencies by typing:
sudo apt update
2- sudo apt install software-properties-common apt-transport-https curl
3- Import the Microsoft GPG key using the following curl command:
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
4- Add the Visual Studio Code repository to your system:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
5- Install the Visual Studio Code package with:
sudo apt update
sudo apt install code
#updating vscode on Debian
You can update vscode using following commands:
1- wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
2 - sudo dpkg -i /tmp/code_latest_amd64.deb
@Ballalkhan
Copy link

y

@32teeth
Copy link

32teeth commented Sep 10, 2024

Tip

Silence the result of the install because sometimes

Configuring code
----------------

The installer would like to add the Microsoft repository and signing key to update VS Code through apt.

Add Microsoft apt repository for Visual Studio Code? [yes/no]
wget --progress=dot:giga 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
DEBIAN_FRONTEND=noninteractive apt install -y /tmp/code_latest_amd64.deb

@alt36
Copy link

alt36 commented Nov 1, 2024

Tip

Silence the result of the install because sometimes

Configuring code
----------------

The installer would like to add the Microsoft repository and signing key to update VS Code through apt.

Add Microsoft apt repository for Visual Studio Code? [yes/no]

You can use debconf-set-selections to provide your desired answer to that question before installing the deb. Run one of the following, where the first "true" command is equivalent to answering "yes", and the second "false" is equivalent to no.

debconf-set-selections <<< "code code/add-microsoft-repo boolean true"
debconf-set-selections <<< "code code/add-microsoft-repo boolean false"

See also microsoft/vscode#22145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment