Changing the Default Terminal in VSCode (Windows 10) to WSL2 Ubuntu 24.04

Abstract: Configure VSCode to use WSL2 Ubuntu 24.04 as the default integrated terminal on Windows 10 by setting the correct profile in user settings.

Created: 2026-07-30 by
To switch your default terminal in Visual Studio Code on Windows 10 to WSL2 Ubuntu 24.04, you must configure the integrated terminal settings within the editor. This process involves selecting the correct profile and ensuring that the WSL extension is properly installed to bridge the Windows host with the Linux subsystem. By adjusting specific JSON configurations or using the UI dropdown, you can make WSL the primary environment for all new terminal instances.

Prerequisites and Extensions

Before changing the default terminal behavior, ensure that the necessary components are present on your system. The most critical requirement is the Remote - WSL extension by Microsoft. Without this extension, VSCode cannot communicate with the Windows Subsystem for Linux instances. You can install it by opening the Extensions view (Ctrl+Shift+X) and searching for "Remote - WSL". Once installed, verify that WSL2 is functioning correctly by running wsl --list --verbose in a standard Windows Command Prompt or PowerShell window. This command should list your Ubuntu 24.04 instance as running version 2. If the instance is not listed or shows version 1, you may need to update it using wsl --set-version Ubuntu-24.04 2. Additionally, ensure that your Ubuntu distribution is up to date by launching it from the Start menu and executing sudo apt update && sudo apt upgrade.

Accessing Terminal Settings

The configuration for the default terminal resides in the user or workspace settings of VSCode. You can access these settings through the graphical interface or directly via the JSON file. To use the graphical interface, press Ctrl+, (or Cmd+, on Mac) to open Settings. In the search bar, type terminal.integrated.defaultProfile.windows. This setting specifically controls which terminal profile appears when you create a new terminal pane. Alternatively, you can edit the settings.json file directly. Open the Command Palette (Ctrl+Shift+P), type "Preferences: Open User Settings (JSON)", and select it. This method provides more granular control and allows you to see the exact structure of your configuration. It is often recommended to edit the JSON file if you encounter issues with the UI not reflecting changes immediately.

Selecting the WSL Profile

In the settings interface, look for the dropdown menu associated with terminal.integrated.defaultProfile.windows. Initially, this might be set to Command Prompt, PowerShell, or CMD. Click the dropdown and select WSL: Ubuntu-24.04. If you do not see this option, it indicates that VSCode has not yet detected the WSL profile correctly. This usually happens if the Remote - WSL extension is not fully loaded or if the WSL service is not running. After selecting the profile, save your settings. The next time you open a new terminal using Ctrl+` or the menu option Terminal > New Terminal, it should launch directly into the Ubuntu shell. You can verify this by checking the title bar of the terminal panel, which should display "Ubuntu-24.04" instead of "Windows PowerShell" or "Command Prompt".

Troubleshooting Common Issues

Sometimes, the WSL profile may appear but fail to launch correctly, resulting in errors or blank screens. A common cause is permission issues or corrupted profiles. First, try restarting VSCode completely. If the issue persists, check the Output panel by going to View > Output and selecting "Terminal" from the dropdown. Look for error messages related to WSL. Another frequent problem arises when multiple WSL distributions are installed; VSCode might default to an older or different version. Ensure that Ubuntu-24.04 is explicitly selected in the settings, not just any generic "WSL" entry. For users experiencing font rendering issues after switching, refer to our guide on Changing Terminal Fonts in WSL Ubuntu VSCode. This article details how to adjust font families and sizes to ensure readability within the WSL terminal context.

Advanced Configuration

For power users, you can define custom profiles for the terminal. This is useful if you want different behaviors for different projects. In settings.json, you can add entries under terminal.integrated.profiles.windows. Here, you can specify the path to the WSL executable and arguments to pass to it. However, for most users, the default profile selection is sufficient. It is also worth noting that if you are working with remote servers or VMs, the terminal configuration might differ. While WSL2 provides a lightweight Linux environment, it operates differently than a full virtual machine. If you are comparing environments, you might find our article on Difference between Windows WSL helpful for understanding the architectural differences between WSL and other Ubuntu installations. Understanding these differences helps in diagnosing why certain commands or tools behave differently in the VSCode terminal compared to a native Windows terminal.

Frequently Asked Questions

Why does my WSL terminal show 'bash' instead of 'zsh'?

This depends on the default shell configured in your Ubuntu distribution. WSL2 typically installs Bash as the default login shell. To change it to Zsh, you need to install Zsh inside Ubuntu and then set it as your default shell using the chsh -s /bin/zsh command within the WSL terminal itself.

Can I have different default terminals for different workspaces?

Yes, VSCode supports workspace-specific settings. You can override the terminal.integrated.defaultProfile.windows setting in the .vscode/settings.json file located in your project folder. This allows you to use PowerShell for some projects and WSL for others automatically.

What should I do if the WSL profile is missing from the dropdown?

Ensure that the Remote - WSL extension is installed and enabled. Also, verify that WSL is running by checking the system tray icon or using the command line. Restarting VSCode after installing the extension often resolves detection issues.

Is there a performance difference between using WSL and Windows terminals in VSCode?

WSL2 offers near-native performance for Linux-based tasks, making it ideal for development environments requiring Linux tools. However, for pure Windows-based scripting, native PowerShell or CMD might offer slightly lower overhead due to less translation layer processing.

How do I reset the terminal profile to its original state?

To reset, simply delete the terminal.integrated.defaultProfile.windows entry from your settings.json file or set it back to Command Prompt via the UI. This will revert to the system default terminal defined by Windows.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More