In this article, we will have explained the necessary steps to install and configure Visual Studio Code on CentOS 8. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
Visual Studio Code is an open-source cross-platform code editor developed by Microsoft. It has built-in debugging support, embedded Git control, syntax highlighting, code completion, integrated terminal, code refactoring, and snippets.
Install Visual Studio Code on CentOS
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo yum install epel-release sudo yum update
Step 2. Install Visual Studio Code on CentOS system.
Import the GPG key used for signing the packages:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
Next, continue to add the Visual Studio Code repository:
sudo tee /etc/yum.repos.d/vscode.repo <<ADDREPO [code] name=Visual Studio Code baseurl=https://packages.microsoft.com/yumrepos/vscode enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc ADDREPO
Once the repository is enabled, install the latest version of Visual Studio Code by typing:
sudo dnf install code
Step 3. Starting Visual Studio Code.
Now that VS Code is installed on your CentOS system you can launch it either from the command line by typing:
Or by clicking on the VS Code icon (Applications -> Programming -> Visual Studio Code).
That’s all you need to do to install Visual Studio Code on CentOS 8 Linux system. I hope you find this quick tip helpful. For further reading on VSC (Visual Studio Code), please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.