How to change the default shell in Windows Terminal

Normally, when you open Windows Terminal, PowerShell will launch as the default shell. However, if you want, you can optionally change this default shell to something of your liking, such as Command Prompt or Ubuntu (Linux).

You may not know it, but there is a piece of code in the settings file of Windows Terminal that decides which shell to open first (the default shell). Thus, by customizing this code, you can change the default shell attached to Windows Terminal, including Command Prompt, Ubuntu (Linux) or Azure Cloud Shell.

To get started, open the 'Start' menu, search for 'Windows Terminal' and click on the corresponding application in the results.

Picture 1 of How to change the default shell in Windows Terminal

Next, click the down arrow icon at the top of the Windows Terminal window, then select 'Settings'.

Picture 2 of How to change the default shell in Windows Terminal

Windows will ask you with which application you want to open the settings file. You can choose any code (or plain text) editor from the list, but we recommend using Notepad for simplicity. Please click 'Notepad' in the list and press 'OK'.

Picture 3 of How to change the default shell in Windows Terminal

When the settings file opens in Notepad, scroll to the shell section that you want to set as default. There is a heading at the top of each section that tells what each particular shell is used for.

For example, the section of PowerShell says 'Make changes here to the powershell.exe profile'. Similarly, the section of the Command Prompt says 'Make changes here to the cmd.exe profile'. The part of Ubuntu has the keyword 'Ubuntu' to the right of the 'name'.

Now copy the text next to 'guid' in the shell you want to select. You don't need to copy both the quotes. Just copy the text inside the quotes, as shown below:

Picture 4 of How to change the default shell in Windows Terminal

Next, you scroll to the top of the settings file and find the 'defaultProfile' text field. Delete the text next to this field and paste the text you copied above here by pressing Ctrl + V.

Picture 5 of How to change the default shell in Windows Terminal

Now, click File > Save in Notepad to save the changes.

Picture 6 of How to change the default shell in Windows Terminal

The shell you selected now becomes the default shell in Windows Terminal.

Update 15 May 2021
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile