IntelliJ | Git Bash / Shell / Powershell as Terminal Command Prompt (Windows)

IntelliJ provides a integrated, built-in command-line interface - the Terminal. This feature allows to make things even simpler as you can combine multiple console windows into your development environment. That allow you to stay inside IntelliJ without leaving it for some extended console tasks in your shell. You are also allowed to open multiple terminal windows at once using multiple tabs. Unfortunately there is just one type of terminal allowed. So you have to decide between you favorite terminal applications like powershell or linux shell.

If you use IntelliJ on windows based computers the windows command prompt (cmd) is used by default. As this one is not as powerful as other tools like a shell you are able to change it. But do not be afraid: if you are using the the "light theme" in IntelliJ, the background color of the terminal will be white for every terminal.

To do so you have to open the settings (Ctrl+Alt+S) and open the Terminal settings page (Tools > Terminal). Alternatively you can type Terminal into the search field to open the page directly. You can now adjust the default terminal as describes as follow:

Git Bash as Terminal


To open the a linux shell as terminal window in IntelliJ you can utilize the shell application integrated with a git installation.  To open a git bash as terminal window you havt to enter "C:\Program Files\Git\bin\sh.exe" -li  as "Shell Path". As you open a new Terminal window the terminal is opened as the knows git bash window.

The used arguments (-li) are explained here.

Windows Powershell


To open the a windows powershell as terminal window in IntelliJ you just insert powershell.exe  as "Shell Path". As you open a new Terminal window the terminal is opened as windows powershell (aka Witchcraft 3.0) ;).

Default windows command prompt


To open the default windows command prompt (cmd) as terminal window in IntelliJ you just insert cmd.exe  as "Shell Path". As you open a new Terminal window the shell is opened as windows command prompt.
{{ message }}

{{ 'Comments are closed.' | trans }}