
In this article, we will review in detail how to install sublime text4 on CentOS8 or RHEL8 and also provide examples. Table of Contents Brief
Learn how to install VSCode on Fedora 40 with our easy, step-by-step guide. Follow RPM and repository installation methods, CLI examples, and troubleshooting tips for a seamless setup.
Visual Studio Code (VSCode) is a powerful, free source-code editor developed by Microsoft, designed to support a wide array of programming languages and frameworks. In this guide, we’ll go through the steps to install VSCode on Fedora 40 Workstation Edition, covering both the official and repository-based installation methods. This comprehensive tutorial ensures you get the latest version of VSCode up and running with minimal effort. We’ll also include table charts and CLI examples to make your setup as efficient as possible.
Prerequisites |
Before installing VSCode on Fedora 40, ensure that your system meets the following prerequisites:
Requirement | Description |
---|---|
Fedora OS Version | Fedora 40 |
User Privileges | Sudo privileges (for package management) |
Internet Connection | Needed to download packages and dependencies |
Installing VSCode on Fedora 40 |
There are two primary ways to install Visual Studio Code on Fedora 40:
Installing via RPM Package |
The RPM package provides a straightforward way to install VSCode. Follow these steps:
Download the Latest VSCode RPM Package |
Open your terminal and download the VSCode package using the following command:
curl -L "https://code.visualstudio.com/sha/download?build=stable&os=linux-rpm-x64" -o vscode.rpm
Photo by admingeek from Infotechys
Install the RPM Package |
Use the dnf
package manager to install the downloaded package.
sudo dnf install ./vscode.rpm
Photo by admingeek from Infotechys
Confirm Installation |
To verify that VSCode has been installed, you can run the following command to check the installed version:
code --version
1.94.2
384ff7382de624fb94dbaf6da11977bba1ecd427
x64
Installing via Repository |
Installing VSCode via its official repository is recommended for long-term use, as it makes updates easier.
Add the Microsoft Repository |
Microsoft offers an official repository for VSCode, which can be added by creating a .repo
file.
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'
Photo by admingeek from Infotechys
Install VSCode Using DNF |
Now, install VSCode from the repository.
sudo dnf install code
Photo by admingeek from Infotechys
Verify the Installation |
Check that VSCode was successfully installed by running:
code --version
If installed correctly, this command will output the version number of VSCode, confirming a successful setup. Here’s a summary of both methods:
Method | Commands | Advantages |
---|---|---|
RPM Package | curl -L “https://code.visualstudio.com/sha/download?build=stable&os=linux-rpm-x64” -o vscode.rpm sudo dnf install ./vscode.rpm | Quick installation |
Official Repository | sudo rpm –import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c ‘echo -e “[code] name=Visual Studio Code baseurl=https://packages.microsoft.com/yumrepos/vscode enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc” > /etc/yum.repos.d/vscode.repo’ sudo dnf install code | Automatic updates via dnf |
After installation, VSCode can be launched in a few different ways:
Via Terminal: |
code
Through the Application Menu: |
Photo by admingeek from Infotechys
Now that VSCode is installed, you may want to customize your environment with extensions, themes, and other configurations.
Installing Extensions |
VSCode extensions allow for enhanced development experiences. Here are some popular ones:
Extension | Purpose | Installation Command |
---|---|---|
Python | Python development tools | code --install-extension ms-python.python |
C/C++ | C/C++ language support | code --install-extension ms-vscode.cpptools |
Prettier – Code Formatter | Code formatting | code --install-extension esbenp.prettier-vscode |
To install an extension, use:
code --install-extension
For example, to install Python support:
code --install-extension ms-python.python
Installing extensions...
Installing extension 'ms-python.python'...
Extension 'ms-python.debugpy' v2024.12.0 was successfully installed.
Extension 'ms-python.python' v2024.16.1 was successfully installed.
Extension 'ms-python.vscode-pylance' v2024.10.1 was successfully installed.
Configuring Themes |
To change themes:
Photo by admingeek from Infotechys
Alternatively, you can click the Browse Color Themes button on the welcome screen to explore a variety of light and dark themes. For additional themes, install them from the marketplace, such as the popular “One Dark Pro” theme:
code --install-extension zhuangtongfa.material-theme
Installing extensions...
Installing extension 'zhuangtongfa.material-theme'...
Extension 'zhuangtongfa.material-theme' v3.17.5 was successfully installed.
If you encounter any issues during installation, here are some troubleshooting tips:
Problem: |
Solution: Make sure the installation completed successfully. Restart your terminal or log out and log back in to apply the PATH
changes.
Problem: |
Solution: Verify that the GPG key was imported correctly with the following command:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
Congratulations! You’ve successfully installed VSCode on Fedora 40. With this versatile and powerful editor, you’re now equipped to dive into any project, whether it’s web development, data science, or systems programming. VSCode’s repository integration also means you’ll stay updated effortlessly. Whether you’re a beginner or a seasoned developer, VSCode’s lightweight, modular design makes it one of the best editors for any coding environment.
Did you find this article useful? Your feedback is invaluable to us! Please feel free to share your thoughts in the comments section below and share this post!
In this article, we will review in detail how to install sublime text4 on CentOS8 or RHEL8 and also provide examples. Table of Contents Brief
In this article, we review how to install VSCode on CentOS 7, providing step-by-step instructions to ensure a seamless setup of the Visual Studio Code
When it comes to popular text editors for Linux, text editors are like wallets. Everybody’s got one and more importantly, everyone’s choice of a text