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.

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:
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)
- Open VS Code Stable:
code
- Log in with your work GitHub account via the Source Control tab or command palette:
- Press
Ctrl+Shift+P→ "Sign in with GitHub"
- Press
Insiders Version (for Personal)
- Open VS Code Insiders:
code-insiders
- 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
- Go to File > Preferences > Profiles > Create Profile
- Create a profile for Work and another for Personal
- 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