Full Guide to Visual Studio Code in 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 in Linux. Its combination of lightness, power and a very active extension ecosystem makes it ideal for any workflow, from simple scribing to complex application development.

n

Installation of VS Code in Linux

n

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

n

    n
  • Official .deb package: download the file from the Microsoft page and install it withsudo dpkg -i code_*.debfollowed bysudo apt-get install -fto solve dependencies.
  • n

  • APT repository: add the GPG key and the repository withwget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpgand thensudo 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 codeprovides automatic updates and insulation.
  • n

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

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

n

After installation, runcodefrom the terminal to launch the editor.

n

Key features for Linux developers

n

VS Code integrates several tools that take advantage of the Linux environment:

n

    n
  • Integrated terminal: open an instance of Bash, Zsh or Fish directly within the editor withCtrl + 'and run commands without changing the window.
  • n

  • WSL 2: If you use Windows Subsystem for Linux, the Remote - WSL extension allows you to work on the Linux file system 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 locally.
  • n

  • Advanced IntelliSense: thanks to Microsoft's language engine, it gets smart self-completed for C / C + +, Python, JavaScript, Go and many more.
  • n

  • Built-in debugging: configure interruption points, variable inspection and stack tracking directly from the debugging view.
  • n

n

Customization and synchronization of settings

n

The editor allows each workflow to be adapted by setting and theme:

n

    n
  • Filesettings.json: modify options such aseditor.fontSize, terminal.integrated.shell.linuxorfiles.autoSave.
  • n

  • Keybindings: reassign keyboard shortcuts onkeybindings.jsonto adapt frequent commands to your flow.
  • n

  • Topics and colors: install themes like Dracula, One Dark Pro or Material Theme from the extension market.
  • n

  • Configuration synchronization: with a GitHub or Microsoft account, activate the Settings Sync option to take your extensions, themes and settings to any machine.
  • n

  • Code Fragments: defines custom snippets for specific languages and accelerates the writing of recurrent patterns.
  • n

n

Debugging, Git and Essential Extensions

n

Version control and debugging are pillars of modern development:

n

    n
  • Integrated Git: the side bar shows changes, allows to create branches, make commitments and resolve conflicts without leaving the editor.
  • n

  • GitLens Extension: improves experience with line notes, history of commitments and branch visualization.
  • n

  • Language extensions: for example,ms-python.pythonfor Python,ms-vscode.cpptoolsfor C / C + +,vscjava.vscode-java-packfor Java.
  • n

  • Docker: extensionms-azuretools.vscode-dockerfacilitates the creation, management and purification of containers.
  • n

  • Linters and formators: tools such as ESLint, Prettier, pylint or clang-format are integrated by extensions and run when saving.
  • n

n

Performance tips and best practices

n

To keep VS Code agile in equipment with limited resources, consider these tips:

n

    n
  • Disable extensions that you do not use frequently by the extension manager.
  • n

  • Use the safe start mode (code --disable-extensions) to diagnose slow-down problems.
  • n

  • Adjustmentrendereracanvasor activate the acceleration of GPU in the settings if your hardware supports it.
  • n

  • Limit open file history and terminal output size.
  • n

  • Keep the editor and its extensions up to date; frequent releases include performance improvements and security corrections.
  • n

n

Conclusion

n

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

This work is under aCreative Commons License Attribution 4.0 International for Francesc Roig francesc @ vivaldi.net.

EnglishenEnglishEnglish