Back to Blog
VSCodeDeveloperUbuntuProductivity

Use Two VS Code Instances on Ubuntu

If you want to run two separate VS Code instances on Ubuntu, each tied to different GitHub accounts or workspaces, here's a complete guide on how to set it up effectively.

D
Dheeraj Jha
January 28, 2025
3 min read
Use Two VS Code Instances on Ubuntu

Introduction

If you want to run two separate VS Code instances on Ubuntu, each tied to different GitHub accounts or workspaces, here's how you can do it:

VS Code Setup Photo by Chris Ried on Unsplash

1. Install VS Code Stable and Insiders Versions

You can run two versions of VS Code: the stable version and the Insiders version. They work independently and can have different settings, extensions, and configurations.

Install VS Code Stable

If you haven't already:

sudo apt update
sudo apt install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt install apt-transport-https
sudo apt update
sudo apt install code

Install VS Code Insiders

For the Insiders version:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code-insiders

2. Configure Separate Accounts

Once installed, open each version and configure them for your workspaces.

Stable Version (for Work)

  1. Open VS Code Stable:
code
  1. Log in with your work GitHub account via the Source Control tab or command palette:
    • Press Ctrl+Shift+P → "Sign in with GitHub"

Insiders Version (for Personal)

  1. Open VS Code Insiders:
code-insiders
  1. Log in with your personal GitHub account in the same way.

3. Use Different Settings and Extensions

Each version will have independent:

  • Extensions - Install different extension sets for work and personal projects
  • Themes - Customize the appearance separately
  • Settings - Maintain unique configurations
  • Git configurations - Separate Git user settings

This separation helps you maintain personal and work environments in their own VS Code instances.

4. Optional: Run Multiple Profiles in One VS Code

If you prefer a single VS Code installation but with multiple profiles, you can do this:

Create Profiles

  1. Go to File > Preferences > Profiles > Create Profile
  2. Create a profile for Work and another for Personal
  3. Switch profiles via the same menu

Configure Profiles

Each profile can have unique:

  • Extensions - Different extensions per profile
  • Settings - Separate configurations
  • GitHub accounts - Switch between accounts easily

Benefits of This Approach

Separation of Concerns

Keep your work and personal projects completely isolated, preventing accidental commits to the wrong repository.

Productivity

Quickly switch between environments without having to sign in/out or change configurations.

Customization

Tailor each VS Code instance or profile to the specific needs of your work or personal projects.

Conclusion

Running two VS Code instances on Ubuntu is straightforward and offers great flexibility for developers managing multiple GitHub accounts or distinct workspaces. Whether you choose to run Stable and Insiders versions side by side or use profiles within a single installation, both approaches help you maintain better organization and productivity.


Need help with your development setup or building your projects?
Portfolio: dheerajjha.com