llms.txt: machine-readable documentation index. Markdown version of this page is also available.

IntelliJ IDEA 2026.3 Help

Terminal

IntelliJ IDEA includes an embedded terminal emulator for working with your command-line tools directly from the IDE. Use it to manage Git repositories, launch Java tools, set file permissions, work with AI coding agents, and perform other command-line tasks without switching to a dedicated terminal application.

Enable the Terminal plugin

This functionality relies on the Terminal plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Find the Terminal plugin and click Enable.

The terminal is powered by libghostty, the terminal emulation library from the Ghostty project.

Initially, the terminal emulator runs with your default system shell, but it supports many other shells, including Windows PowerShell, Command Prompt, sh, bash, zsh, csh, and so on. For more information about changing the shell, refer to Terminal settings. To run another shell in a single tab without changing the default one, refer to Start a session in another shell.

Access the Terminal tool window

  • Go to View | Tool Windows | Terminal or press Alt+F12.

    By default, the terminal emulator runs with the current directory set to the root directory of the current project. For more information about changing the default start directory, refer to Terminal settings.

  • Right-click any file (for example, in the Project tool window (Alt+1) or any open editor tab) and select Open in | Terminal to open the Terminal tool window with a new session in the directory of that file.

Terminal sessions

Local session

Start a new local session

  • To start a new session in a separate tab, click the Add button on the toolbar or press Ctrl+Shift+T.

    New session in the terminal
  • To close a tab, click the Close button on the terminal toolbar or press Ctrl+F4.

  • To terminate a running session, close the tab by clicking the Close button and confirm the process termination.

  • To switch between active tabs, press Alt+Right and Alt+Left. Alternatively, you can press Alt+Down to see the list of all terminal tabs.

  • To clear the terminal screen, press ⌘ K.

The terminal saves tabs and sessions when you close the project or IntelliJ IDEA. It preserves tab names, the current working directory, and even the shell history.

Predefined session

IntelliJ IDEA automatically detects common shells for predefined sessions and can run any of them in a new tab. The shell that you select applies to the current tab only and does not affect other tabs. Newly created tabs keep using the default shell specified in the terminal settings.

Start a session in a detected shell

  1. On the terminal toolbar, click the New Predefined Session button New Predefined Session.

    Start a predefined session in a detected shell
  2. Select a shell from the list. IntelliJ IDEA opens a new tab named after the shell and starts the session in it.

The list includes the following shells:

  • On Windows: Windows PowerShell, Command Prompt, PowerShell, Git Bash, and the installed WSL distributions.

  • On macOS and Linux: bash, zsh, fish, and pwsh found in /bin, /usr/bin, /usr/local/bin, and /opt/homebrew/bin.

Shells outside these locations, as well as other shell types, are not detected automatically. To use them, specify the path to the executable in the Shell path option in Settings | Tools | Terminal.

If several detected shells have the same name, IntelliJ IDEA appends their paths to the names, for example, zsh (/bin/zsh) and zsh (/opt/homebrew/bin/zsh).

If your project is located in WSL or in a Dev Container, the list groups the shells by environment so that you can start a session either in that environment or on the host machine.

SSH session

Enable the SSH Remote Run plugin

This functionality relies on the SSH Remote Run plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Find the SSH Remote Run plugin and click Enable.

Start a new SSH session

  1. On the terminal toolbar, click Start a new SSH session and select New SSH Session.

    Start a new SSH session
  2. Enter the address of the host to which you want to connect and provide authentication data.

    Providing data in the SSH Session dialog

    Or, if you have configured SSH configurations, you can select one of them from the list.

To terminate the connection, click Terminate session in the terminal tab.

Work in the terminal

  • To search for a certain string in a terminal session, press Ctrl+F. This searches all text in the session: the prompt, commands, and output.

By default, the search is not case-sensitive. You can click the Match Case icon (Match case) in the search field to make it case-sensitive.

Rename a terminal tab

  • Right-click the tab and select Rename Session from the context menu.

Use completion in the terminal

IntelliJ IDEA provides completion for command names, options, and arguments, such as paths, Git branches, flags, and more.

Suggestions automatically appear in the Terminal tool window as you type. By default, IntelliJ IDEA shows suggestions for parameters.

  • To enable completion for subcommands, parameters, and arguments, go to Settings | Tools | Terminal | Command Completion, and select Always for the Show a completion popup as you type option.

  • To invoke the completion popup manually, press Ctrl+Space.

  • To accept a suggestion, select it in the list and press Enter.

Completion of commands in the terminal

The terminal recognizes and highlights absolute and relative paths to files and folders. When you hover over them, they appear as hyperlinks. This allows you to quickly navigate to locations referenced in compilation messages, build errors, or AI coding agent responses.

  • Hold Ctrl and click a file name in the terminal to open it in the editor.

  • Hold Ctrl and click a link with the folder name in the terminal to locate it in the Project tool window. If a folder is outside the current project, IntelliJ IDEA will open the default file system explorer.

  • Alternatively, click a file or folder name and use the Open link in the tooltip.

Drag and drop files and folders to the terminal

You can drag files and folders into the Terminal tool window from the Project tool window (Alt+1) or your system file manager. The result depends on where you drop the item.

  • Drop a file or folder on the terminal output area (1) to paste its path at the prompt of the current session.

    This is useful when you send file context to a CLI coding agent or run a command that takes a path as an argument.

  • Drop a file or folder on the terminal tab area (2) to open a new tab with the working directory set to the dropped folder, or to the parent folder of the dropped file.

Dragging a file into the Terminal tool window

Customize the terminal layout

Arrange terminal tabs to match your workflow: show several sessions side by side, open a session in the editor area, or detach the Terminal tool window from the main window.

Split terminal tabs

You can split the Terminal tool window into several groups of tabs and work with multiple sessions at once. For example, run a CLI coding agent in one group and other shell commands in another. A new tab opened with a split action starts a session in the working directory of the original tab.

The Terminal tool window split into two groups of tabs with Split Right
  • To open a new tab next to the current one, right-click the tab and select Split Right or Split Down.

  • To move a tab to a separate group, right-click it and select Split and Move Right or Split and Move Down. These options are available when the group contains more than one tab.

  • Alternatively, drag a tab to any edge of the Terminal tool window. IntelliJ IDEA highlights the area where the new group appears. To move a tab to an existing group, drag it to the tab headers of that group.

  • To move the focus between groups, click a group or go to Window | Active Tool Window | Go to Next Splitter (⌥ ⇥) or Go to Previous Splitter (⌥ ⇧ ⇥).

  • To merge split tab groups, right-click a tab and select Unsplit. If you previously split the tool window several times, repeat the action for each split. Alternatively, drag all tabs of a group to the tab headers of another group. When you close or move the last tab of a group, the group is automatically removed.

Open a terminal tab in the editor

You can move a tab from the Terminal tool window to the editor area and use it as a regular editor tab.

  • Right-click the tab in the Terminal tool window and select Open as Editor Tab (Alt+Shift+Enter) or drag the tab to the editor area.

    If you move the last tab in the tool window, the Terminal tool window hides automatically.

  • To move the tab back, right-click it in the editor and select Return to Tool Window, or drag it to the Terminal tool window.

This gives the session the full height of the editor area, which helps when you follow the output of a long-running command or work with a CLI coding agent. The session keeps running while the tab moves, so the command history and output are preserved.

To float the Terminal tool window over the IDE or move it to a separate window, change its view mode.

Terminal engine

Currently, the following terminal engines are available in IntelliJ IDEA:

  • Reworked (default). Starting from version 2025.2, this is the default terminal engine in IntelliJ IDEA. It is designed to combine the stability of the Classic emulator with improved performance, compatibility, and modern enhancements.

  • Classic. This is a standard terminal emulator of the previous generation, built on the JediTerm library, with user input (commands and keystrokes) sent directly to the underlying shell.

The Experimental 2024 (deprecated) terminal engine, also known as New Terminal in IntelliJ IDEA 2024.*, has been deprecated due to compatibility challenges. The option to select this terminal engine is available only to users who had enabled it in IntelliJ IDEA 2024.*. You can find the documentation for it in the earlier version of IntelliJ IDEA Help.

Select a Terminal engine

  1. Open the Terminal tool window: View | Tool Windows | Terminal.

  2. In the tool window header, click Options and select a terminal engine.

    Terminal Select Engine

    Alternatively, open the IDE settings (Ctrl+Alt+S) and go to Tools | Terminal | Terminal engine.

Configure the terminal

Configure the terminal emulator

  • Press Ctrl+Alt+S to open settings and then select Tools | Terminal.

  • Alternatively, click on the Terminal toolbar and select Settings.

For more information, refer to Terminal settings.

Configure separators between executed commands

To better distinguish where commands start and end, you can enable separators in the terminal.

  1. Press Ctrl+Alt+S to open settings and then select Tools | Terminal.

  2. Use the Show separators between executed commands option to enable or disable separators.

    Command separators are enabled
    Command separators are disabled
  3. Click Apply to save the changes.

JDK in the Terminal

IntelliJ IDEA makes the JDK configured for your project available in the built-in terminal. When you set up a project SDK, IntelliJ IDEA adds it to the JAVA_HOME and PATH environment variables of every terminal session. This way, you can run java, javac, and build tools such as ./gradlew or mvn directly in the terminal without installing or configuring a JDK on your system separately.

The terminal follows the project SDK: when you change it in File | Project Structure | Project Settings | Project, IntelliJ IDEA updates the JDK used for new terminal sessions.

This behavior is controlled by the Add project JDK to PATH option in Settings | Tools | Terminal, which is enabled by default.

Environment variables for a running shell session cannot be changed retroactively. If the Terminal tool window is open, when you switch a project JDK or toggle the Add project JDK to PATH option, IntelliJ IDEA prompts you to start a new terminal session.

Configure a JDK from the terminal

If you run a Java command in the terminal and IntelliJ IDEA cannot find a JDK, it shows a Configure JDK link in the terminal output. Click it to open the Project Structure dialog, where you can download and configure a JDK.

23 October 2026