Skip to content

Instantly share code, notes, and snippets.

@brianblakely
Last active December 23, 2019 17:25
Show Gist options
  • Save brianblakely/b0e26f7611c41a804aed33c166bcfd0f to your computer and use it in GitHub Desktop.
Save brianblakely/b0e26f7611c41a804aed33c166bcfd0f to your computer and use it in GitHub Desktop.
Update or install VS Code on RHEL, Fedora, and CentOS based distributions.
#!/bin/sh
echo 'Beginning Visual Studio Code update.'
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
sudo dnf check-update
sudo dnf install code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment