Complete guide to Visual Studio Code on Linux: installation, features, and tricks

Introduction

\n

Visual Studio Code, known as VS Code, has become one of the most popular code editors among developers working on Linux. Its combination of lightness, power, and a very active ecosystem of extensions makes it ideal for any workflow, from simple scripting to complex application development.

\n\n

Installing VS Code on Linux

\n

There are several ways to install VS Code on Debian-, Ubuntu-, Fedora-, Arch-based distributions and others. The most common methods are:

\n

    \n
  • Official .deb package: download the file from the Microsoft page and install it with sudo dpkg -i code_*.deb followed by sudo apt-get install -f to resolve dependencies.
  • \n

  • APT repository: add the GPG key and repository with wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg and then sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/; then add the repository and update.
  • \n

  • Snap: sudo snap install --classic code provides automatic updates and isolation.
  • \n

  • Flatpak: flatpak install flathub com.visualstudio.code is another option for users who prefer this format.
  • \n

  • Tarball: download the .tar.gz file, extract it, and run ./code from the resulting folder; useful for testing or environments without installation privileges.
  • \n

\n

After installation, run code from the terminal to launch the editor.

\n\n

Key Features for Linux Developers

\n

VS Code integrates several tools that leverage the Linux environment:

\n

    \n
  • Integrated terminal: open a Bash, Zsh, or Fish instance directly inside the editor with Ctrl+` and run commands without switching windows.
  • \n

  • WSL 2: if you use Windows Subsystem for Linux, the Remote – WSL extension lets you work on the Linux filesystem while enjoying the Windows interface.
  • \n

  • Remote – SSH and Remote – Containers: connect your instance to remote servers or Docker containers, editing code as if it were local.
  • \n

  • Advanced IntelliSense: thanks to Microsoft’s language engine, you get intelligent autocomplete for C/C++, Python, JavaScript, Go, and many more.
  • \n

  • Built-in debugging: set breakpoints, inspect variables, and trace stack directly from the debug view.
  • \n

\n\n

Customization and Settings Synchronization

\n

The editor allows adapting to each workflow via settings and themes:

\n

    \n
  • settings.json file: modify options such as editor.fontSize, terminal.integrated.shell.linux or files.autoSave.
  • \n

  • Keybindings: reassign keyboard shortcuts in keybindings.json to adapt frequent commands to your flow.
  • \n

  • Themes and colors: install themes like Dracula, One Dark Pro, or Material Theme from the extensions marketplace.
  • \n

  • Settings synchronization: with a GitHub or Microsoft account, enable Settings Sync to carry your extensions, themes, and settings to any machine.
  • \n

  • Code snippets: define custom snippets for specific languages and speed up writing recurring patterns.
  • \n

\n\n

Debugging, Git, and Essential Extensions

\n

Version control and debugging are pillars of modern development:

\n

    \n
  • Integrated Git: the sidebar shows changes, allows creating branches, making commits, and resolving conflicts without leaving the editor.
  • \n

  • GitLens extension: enhances the experience with line annotations, commit history, and branch visualization.
  • \n

  • Language extensions: for example, ms-python.python for Python, ms-vscode.cpptools for C/C++, vscjava.vscode-java-pack for Java.
  • \n

  • Docker: the ms-azuretools.vscode-docker extension facilitates creation, management, and debugging of containers.
  • \n

  • Linters and formatters: tools like ESLint, Prettier, pylint, or clang-format are integrated via extensions and run on save.
  • \n

\n\n

Performance Tips and Best Practices

\n

To keep VS Code snappy on machines with limited resources, consider these tips:

\n

    \n
  • Disable extensions you don’t use frequently via the extensions manager.
  • \n

  • Use safe startup mode (code --disable-extensions) to diagnose slowness issues.
  • \n

  • Adjust renderer to canvas or enable GPU acceleration in settings if your hardware supports it.
  • \n

  • Limit the history of opened files and the size of terminal output.
  • \n

  • Keep the editor and its extensions updated; frequent releases include performance improvements and security fixes.
  • \n

\n\n

Conclusion

\n

Visual Studio Code offers a robust and flexible platform for Linux developers, combining a lightweight editor with powerful debugging tools, Git control, and a vast library of extensions. Whether you are writing shell scripts, developing web applications, or working on embedded systems projects, VS Code adapts to your needs and improves daily productivity.