Modify the Shell Opened By Default in Windows Terminal

Updated at: 2020-06-16 Views: 2022 Words: 131 Category: Windows

Every time you open Windows Terminal, it opens the Power Shell by default, but I only use WSL Ubuntu.

So, I would like to set WSL Shell to open by default.

Just click on the drop down arrow at the top, select "Settings" and change the value of defaultProfile to the corresponding value of the guid is fine.

e.g.

"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf -066e8a4b1e40}",

You should change the guid to yours in settings file.

Set the default directory

Even though WSL is set to open by default, the default path is still the Windows user's root directory.

Change it to the user's root directory under WSL.

{
	"guid":"{c6eaf9f4-32a7-5fdc-b5cf- 066e8a4b1e40}",
	"hidden": false,
	"name": "Ubuntu-18.04",
	"source": "Windows.Terminal.Wsl",
	"startingDirectory": "//wsl$/Ubuntu-18.04/ home/zhongwei/"
},

Reference

  • https://docs.microsoft.com/en-us/windows/ terminal/customize-settings/profile- settings
  • https://github.com/microsoft/terminal/ issues/2743

Leave a Comment