How to change the default shell in Windows Terminal
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.
Next, click the down arrow icon at the top of the Windows Terminal window, then select 'Settings'.
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'.
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:
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.
Now, click File > Save in Notepad to save the changes.
The shell you selected now becomes the default shell in Windows Terminal.
You should read it
- How to Change Default Folder in Windows Terminal
- How to customize Windows Terminal application
- Windows Terminal is about to have a retro version with a 'classic' interface.
- How to make Windows Terminal the default Terminal application and its benefits
- Microsoft released Windows Terminal with many interesting advantages
- How to delete the user and the machine name in the command prompt on Terminal
- Set up Windows Terminal to always open with Command Prompt on Windows 11
- How to set Windows Terminal to always open with Command Prompt on Windows 11
May be interested
- How to set up child control on Windows 10these days, it's hard to stop your kids from seeing inappropriate things online. that's why it's so important to set up parental controls on children's computers.
- How to fix Windows 10 failure to update error KB5003173microsoft released new cumulative updates for windows 10 earlier this month as part of the may 2021 patch tuesday cycle. however, many users running versions 2004 and 20h2 reported the error.
- How to Change Default Folder in Windows Terminalby default, windows terminal will use your current user directory as the default directory when you open it. however, you can completely change this folder to any other folder on your windows pc.
- Windows 10 1809 and 1909 officially discontinued supportmicrosoft has just reminded users that windows 10 versions 1809, 1909 have been discontinued. in the may patch tuesday update that has just been released, microsoft has patched 55 security holes on its products.
- How to take screenshots, annotate images with Snip & Sketch on Windows 10detailed instructions on how to take screenshots, annotate images with snip & sketch on windows 10. detailed instructions on how to use the snip & sketch tool from az.
- How to Factory Reset Windows 10 PC with Command Promptif your windows 10 pc for some reason unexpectedly slows down, behaves abnormally, or you're about to sell it and want to return your system to its 'original' state, the best way to do a factory reset (factory reset) the device, you'll want to do a factory reset.