I want to change the default terminal app used by Visual Studio Code for Mac. I am thinking it is part of preferences or settings json, but unsure.
-
please look at answer 2 – clankill3r Mar 07 '19 at 21:14
8 Answers
Here's an example of how to make another terminal the default for VSCode, in this example I've downloaded iTerm2 and copied iTerm2 to Applications.
- Code (Menu) > Preferences > User Settings
- Edit settings.json
"terminal.external.osxExec": "iTerm.app"and"terminal.explorerKind": "external"
- Open in Terminal
- iTerm is now default terminal launched from VSCode
-
in my end, i need to add this line in settings also "terminal.integrated.shell.osx": "zsh" – Underdog Apr 19 '19 at 14:24
-
2
-
3@ArupRakshit Nope, if you look in your applications folder, the app is called iTerm.app even if it's iTerm2. – Janosh Jan 23 '20 at 11:52
-
1@Underdog, current version of the command for 'zhn' is: ,"terminal.integrated.defaultProfile.osx": "zsh" . Yours is deprecated now. – Data Engineer Aug 23 '22 at 00:27
For those that want to change the default integrated terminal NOT just the external, and add custom themes, show which git branch you are on, and whether or not files need to be staged or committed for example.
Follow these short steps:
Make sure you have these installed:
Install a powerline font (I am using Menlo which is a nice looking and very popular font).
Go here and click on
downloadOpen the file
Click on
install font(Note: without this, vscode integrated terminal will not render themes correctly)
Open the .zshrc file by running this command:
cd ~ ; code .zshrc
Change iTerm's theme to agnoster:
Press
⌘fto open search in the .zshrc fileType
ZSH_THEMESearch until you find the live code, NOT the commented out code :)
Edit the code it so it looks like
ZSH_THEME="agnoster"Save the file
Open vscode settings using shortcut:
⌘,
Inside of vscode settings, you will see two panels. On the right panel paste this:
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"
Assuming the settings were empty before, it should now look like this:
{
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"
}
Finished! Enjoy your new pimped out terminal
-(Optional customization)-
If you want your prompt to display something other than your username such as a thunder bolt, like in mine or anything you want
Open agnoster theme by runnning this command:
cd ~/.oh-my-zsh/themes/ ; code agnoster.zsh-theme
Open search by pressing:
⌘f
Paste this in search bar:
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
To change your what your prompt displays, edit ONLY this part:
$USER@%m
DO NOT CHANGE this part:
prompt_segment black default "%(!.%{%F{yellow}%}.)
In conclusion, the code should now look something like this:
prompt_segment black default "%(!.%{%F{yellow}%}.) Insert here whatever your heart desires"(Note: Technically you can change everything about your terminal prompt, but for the sake of keeping this short, and simple we only edited the username part)
- 1,540
- 1
- 8
- 9
-
2looks like you also bumped up the line height to give the text a little breathing room: "terminal.integrated.lineHeight": 1.5 – Jude Apr 25 '18 at 16:02
-
can you please elaborate: how do I add little icons like your lightning bold? – Daniel da Rocha May 19 '18 at 10:14
-
Just figured it out: `prompt_segment black default "%(!.%{%F{yellow}%}.)"$'\u26a1'` – Daniel da Rocha May 19 '18 at 10:17
-
1
-
1It's working, but I recommend the following font: "terminal.integrated.fontFamily": "Cousine for Powerline" – Pablo Rioseco Oct 14 '19 at 14:32
-
@joshkmartinez with ZSH + iterm2 + Powerlevel10k, you should specify `MesloLGS NF` – Eric Wiener Mar 01 '21 at 14:50
-
None of these answers fully worked for me. Here is what I changed to get it to work:
Select the default shell as zsh:
CMD + SHIFT + P to open up the command palette. Then type Terminal: Select Default Shell. You can then select zsh.

Change the terminal to use iTerm
Change the font family to use Powerlevel10k
Result
- 4,929
- 4
- 31
- 40
-
"terminal.integrated.fontFamily": "Hack Nerd Font" works like a charm. – Mina Ragaie Mar 08 '21 at 06:03
-
1
-
Note if you are having issues with "CMD + `" opening a new external iTerm window, make sure that you didn't set your iTerm hotkey to be that. – Eric Wiener Jun 27 '23 at 17:34
I recently changed my terminal in VSCode to ozh, its just 1 step and 1 line.
Open
Command PaletteusingView > Command Palette( or simplyCommand + Shift + P)add the following line to the
user settings."terminal.integrated.shell.osx": "zsh"
- 1,988
- 19
- 21
-
3That does not answers the question. It's about changing the terminal used, not the shell. – José Coelho Aug 15 '19 at 21:08
-
2
-
well I know it's so late, but you could just change it by running command
Terminal: Select Default Shell
its so much easier
- 61
- 1
- 1
-
Kind of grave digging on posts but the above solutions would be helpful for specific use-cases. – Tom Dickson Dec 11 '18 at 07:34
-
-
I can't find that command - I think it may now be Terminal: Select Default Profile, although I'm not sure as I don't have it working – Casebash May 11 '21 at 23:56
From visual studio code blog:
// 64-bit cmd it available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\cmd.exe"
// 64-bit PowerShell if available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
// Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
// Bash on Ubuntu (on Windows)
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
Reference: Integrated Terminal
- 3,862
- 4
- 28
- 38
In vscode settings.json add:
"terminal.integrated.profiles.osx": {
"zsh": null
},
- 51
- 1
- 2
No. But you can vote for this feature here: https://visualstudio.uservoice.com/forums/293070-visual-studio-code
- 2,659
- 2
- 13
- 11
-
50For anyone reading this, the correct answer is further down. Change setting `"terminal.external.osxExec": "iTerm.app"` – Simon Lang Dec 21 '16 at 23:40
-
1You can change the external terminal to iterm2 (which opens a separate window, not inside vscode), but not the integrated shell. See: https://stackoverflow.com/a/44163545/1316649 – fstang Aug 27 '20 at 02:13
-
This 'was' the correct answer for some time, but have adjusted the accepted answer. – Joey Schluchter Feb 28 '23 at 19:01







