how to change default terminal in vscode

Change Default Terminal in VS Code: Step-by-Step

By Joseph Thomas
AD

Are you tired of using the default terminal in Visual Studio Code (VSCode)? You're not alone. Many developers prefer a specific terminal because of its look, features, or customizability. Luckily, VSCode allows you to change the default terminal to your preferred one easily. Here's a step-by-step guide to help you.

Before we proceed, it's essential to understand that this guide assumes you're using a Unix-based terminal (like Bash or Zsh), as choosing a default terminal for Windows Subsystem for Linux (WSL) or PowerShell is slightly different. This walkthrough is for VSCode on macOS, Linux, or WSL.

Understanding Your Terminal

First, let's ensure you understand what your terminal actually is. It's essentially an application that allows you to interact with your computer via a command line. Popular Unix-based terminals include GNOME Terminal, Konsole (KDE), and Apple's Terminal.

AD
VS Code shortcuts that a beginner programmer needs
VS Code shortcuts that a beginner programmer needs
πŸ”Ž Change Font Size Without Zooming VS Code UI #vscode #developertips #coding #programmin
πŸ”Ž Change Font Size Without Zooming VS Code UI #vscode #developertips #coding #programmin
Top VS Code Extensions You Need (Boost Productivity Instantly)
Top VS Code Extensions You Need (Boost Productivity Instantly)

Changing your default terminal means changing the application VSCode uses to run its integrated terminal. It doesn't affect your system's default terminal for other applications.

Finding Your Terminal's Executable Path

Before we change the default terminal in VSCode, we need to find the executable path of your preferred terminal. Here's how:

Fitbit Development: By Your Command! Meet the Command Line Interface
Fitbit Development: By Your Command! Meet the Command Line Interface
20 VS Code Shortcuts Every Developer Should Know πŸ’»βš‘
20 VS Code Shortcuts Every Developer Should Know πŸ’»βš‘
10 VS Code Shortcuts Every Developer Should Know πŸ’»
10 VS Code Shortcuts Every Developer Should Know πŸ’»
  1. Open a terminal window.
  2. Type which followed by your terminal's name (e.g., which gnome-terminal).
  3. The output will be the full path to your terminal's executable (e.g., /usr/bin/gnome-terminal).

Note this path down; you'll need it later.

Changing the Default Terminal in VSCode

Now that you have the path, let's change your default terminal in VSCode:

AD
  1. Open VSCode.
  2. Press Ctrl+, (or Cmd+, on macOS) to open the Settings menu.
  3. Type terminal.integrated.defaultProfile in the search bar.
  4. Click on the drop-down menu and select Command.
  5. In the Command field, type bash exec , replacing with the path you noted earlier (e.g., bash exec /usr/bin/gnome-terminal).
  6. Press Enter to save your changes.
  7. Restart VSCode for the changes to take effect.

Now, whenever you open a new terminal in VSCode, it will use your preferred terminal.

How to Change VS Code Terminal Color
How to Change VS Code Terminal Color
How to Debug a Node.js Application with VSCode, Docker, and your Terminal
How to Debug a Node.js Application with VSCode, Docker, and your Terminal
10 Essential VS Code Extensions for Web Developers
10 Essential VS Code Extensions for Web Developers
CODE
CODE
Change VSCode icons
Change VSCode icons
Learn how to run JavaScript program in visual studio code | VSCode Terminal Not Working
Learn how to run JavaScript program in visual studio code | VSCode Terminal Not Working

Troubleshooting Common Issues

Occasionally, you might encounter issues. Here are a couple of common problems and their solutions:

Ensure Your System's Terminal is Installed

Sometimes, VSCode might not recognize your preferred terminal if it's not installed system-wide. To check if it's installed, use the which command as mentioned earlier. If it's not found, you'll need to install it.

AD

Check Your Terminal's Configuration File

If your terminal still isn't starting correctly after specifying its path, check its configuration file. Some terminals, like GNOME Terminal, use a configuration file (usually ~/.bashrc or ~/.bash_profile) to set their behavior.

πŸ’™ VS Code Tips & Best Extensions for Beginners | Essential Shortcuts & Themes Cheat Sheet
πŸ’™ VS Code Tips & Best Extensions for Beginners | Essential Shortcuts & Themes Cheat Sheet
7 Terminal Commands Every Beginner Developer Should Know πŸ’» | Linux & macOS Cheat Sheet
7 Terminal Commands Every Beginner Developer Should Know πŸ’» | Linux & macOS Cheat Sheet
How to Create Custom Tasks in VSCode
How to Create Custom Tasks in VSCode

Ensure that the terminal you specified in VSCode is configured to start in a way compatible with VSCode. If not, you might need to adjust your terminal's configuration file.

And there you have it! You've now successfully changed your default terminal in VSCode. happy coding! Remember, the beauty of coding is that there's always more to explore and learn. Why not try exploring other terminal customization options next?

AD
AD