Install VSCode on RHEL 10 Workstation

Install VSCode on RHEL 10 Workstation

Install Visual Studio Code on RHEL 10 Workstation in minutes. Follow this clear, step‑by‑step guide with CLI snippets, tables, repo setup, troubleshooting tips, and extension management to get VSCode running smoothly on your enterprise Linux platform.

Table of Contents

🔈Introduction

Visual Studio Code (VS Code) has quickly become one of the most popular code editors for developers, thanks to its speed, flexibility, and rich extension ecosystem. Whether you’re working on Python, Java, C++, or DevOps workflows, VS Code provides a lightweight yet powerful environment tailored for productivity. In this guide, we’ll walk you through installing Visual Studio Code (VSCode) on Red Hat Enterprise Linux (RHEL) 10  step by step. You’ll learn how to configure repositories, run the necessary CLI commands, manage extensions, and troubleshoot common issues—ensuring a smooth setup on your enterprise Linux platform.


✅ Why Install VSCode on RHEL 10?

  • Cutting‑edge development tools: VSCode is lightweight, extensible, and widely adopted.
  • Enterprise‑grade stability: RHEL 10 brings up‑to‑date security and support ideal for workstations.
  • Familiar workflow: Developers accustomed to Windows/macOS tools feel right at home.

✅ System Requirements

Before installing, ensure your RHEL 10 Workstation meets these minimum requirements:

ComponentMinimum Requirement
OS VersionRed Hat Enterprise Linux 10 Workstation
Package Managerdnf with root or sudo privileges
Disk Space≥ 200 MB free space for VSCode
NetworkInternet access to fetch VSCode repo

📝 Pre‑Installation Steps

First, ensure your system is updated:

				
					sudo dnf update -y
				
			

Then install essential utilities:

				
					sudo dnf install -y wget gpg
				
			

This ensures you can fetch RPMs and install keys securely.

Install VSCode on RHEL 10 Workstation

Photo by admingeek from Infotechys

💡By default, the wget and gpg packages should already be installed on RHEL 10 Workstation.

🔁 Adding Microsoft’s VSCode Repository

Next, add the Microsoft repository and its GPG key:

				
					sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
				
			

Become the root user and create a repo file:

				
					cat <<EOF | sudo tee /etc/yum.repos.d/vscode.repo
[code]
name=Visual Studio Code on RHEL 10
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF     
				
			

Then refresh your cache:

				
					sudo dnf check-update
				
			
				
					Updating Subscription Management repositories.
Visual Studio Code on RHEL 10                                                                                                  281  B/s | 134  B     00:00    
Last metadata expiration check: 0:00:01 ago on Sat 30 Aug 2025 12:22:34 AM EDT.
				
			

🔁 Installing VSCode via dnf

Now you can install VSCode smoothly:

				
					sudo dnf install -y code
				
			
				
					Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)                                                                      4.7 MB/s | 3.1 MB     00:00    
Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)                                                                          12 MB/s |  19 MB     00:01    
Visual Studio Code on RHEL 10                                                                                                  2.3 kB/s | 481  B     00:00    
Visual Studio Code on RHEL 10                                                                                                   12 kB/s | 975  B     00:00    
Importing GPG key 0xBE1229CF:
 Userid     : "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
 Fingerprint: BC52 8686 B50D 79E3 39D3 721C EB3E 94AD BE12 29CF
 From       : https://packages.microsoft.com/keys/microsoft.asc
Is this ok [y/N]: y
Visual Studio Code on RHEL 10              
...omitted for brevity...

				
			

To confirm installation:

				
					code --version
				
			

You should see an output like:

				
					1.103.2
6f17636121051a53c88d3e605c491d22af2ba755
x64
				
			

🔁 Launching and Verifying Installation

To start VSCode from the command line:

				
					code &
				
			
Install VSCode on RHEL 10 Workstation

Photo by admingeek from Infotechys

Or launch from desktop GUI: find “Visual Studio Code” in your application launcher.

Install VSCode on RHEL 10 Workstation: Launch VSCode

Photo by admingeek from Infotechys

🔁 Optional: Installing Extensions & Customization

VSCode’s strength lies in extensibility. Add popular extensions:

				
					code --install-extension ms-python.python
code --install-extension ms-vscode.cpptools
				
			

To automate extension installs, prepare a script (e.g. install-extensions.sh):

				
					#!/bin/bash
extensions=(
  ms-python.python
  ms-vscode.cpptools
  eamodio.gitlens
)
for ext in "${extensions[@]}"; do
  code --install-extension "$ext"
done
				
			

Make executable and run:

				
					chmod +x install-extensions.sh
./install-extensions.sh
				
			

🔁 Uninstalling VSCode

When needed, remove VSCode cleanly:

				
					sudo dnf remove -y code
sudo rm -f /etc/yum.repos.d/vscode.repo
				
			

🧰 Troubleshooting & Tips

IssueTroubleshooting Steps
GPG key import errorCheck internet or correct URL: https://packages.microsoft.com/keys/microsoft.asc
dnf: package not foundRun sudo dnf clean all && sudo dnf check-update
Launch fails (GUI)Install dependencies: sudo dnf install -y libXScrnSaver
Locale or font rendering issuesSet environment vars (e.g. LANG=en_US.UTF-8) and verify "code --verbose"

▶️ Post‑Installation Recommendations

  • Enable automatic updates: Use dnf-automatic to keep VSCode current.
  • Backup your custom settings: Sync via VSCode Accounts or use settings.json version control.
  • Explore advanced customizations: Command palette (Ctrl+Shift+P), snippets, and theming.

🏁 Conclusion

By following this guide, you should now have Visual Studio Code fully installed and configured on RHEL 10 Workstation. With repositories set up and extensions installed, your development environment is ready for use in enterprise or personal projects. The combination of VS Code’s flexibility and RHEL’s reliability gives you a robust platform for coding, debugging, and collaboration. From here, you can customize your editor further, integrate with Git, or explore specialized extensions to match your workflow. In just a few minutes, you’ve transformed your workstation into a powerful development hub.

Did you find this article helpful? Your feedback is invaluable to us! Feel free to share this post with those who may benefit, and let us know your thoughts in the comments section below.


👉 Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *