IntelliJ IDEA includes an embed terminal copycat for working with your command-line plate from inside the IDE. Use it to run Java tools, Git commands, set file permissions, and perform other command-line tasks without switching to a dedicated end application. initially, the terminal copycat runs with your default system shell, but it supports many other shells, such as Windows PowerShell, Command Prompt cmd.exe,
csh, and indeed on. For information about changing the blast, see Configure the concluding copycat .
Open the Terminal tool window
- From the main menu, blue-ribbon View | Tool Windows | Terminal or bid Alt+F12.
Reading: Terminal | IntelliJ IDEA
By default, the concluding copycat runs with the stream directory typeset to the root directory of the current project. For information about changing the default start directory, see Configure the terminal copycat. alternatively, you can right-click any charge ( for exercise, in the Project instrument window or any open check ) and choose Open in Terminal from the context menu to open the Terminal instrument window with a raw seance in the directory of that file.
Start a new session
- Click on the toolbar to start a new school term in a separate pill .
To run multiple sessions inside a tab key, right-click the tab and blue-ribbon Split Right or Split Down in the context menu. The Terminal saves tabs and sessions when you close the plan or IntelliJ IDEA. It preserves pill names, the current ferment directory, and even the shell history. To close a tab, cluck on the Terminal toolbar or right-click the yellow journalism and choose Close Tab from the context menu. Press Alt+Right and Alt+Left to switch between active tabs. alternatively, you can press Alt+Down to see the list of all end tabs. To rename a check, right-click the check and choose Rename Session from the context menu. To search for a certain string in a Terminal session, press Ctrl+F. This searches all text in the seance : the prompt, commands, and output.
Configure the terminal emulator
- Press Ctrl+Alt+S to open the IDE settings and choose Tools | Terminal .
These settings affect the terminal alone for the stream project :
|Start directory||Specify the ferment directory where every new shell school term should start. By default, it starts in the root directory of the current project .|
|environment variables||Specify custom-made environment variables for every modern shell school term .|
These settings affect the terminal in any project that you open with the current IntelliJ IDEA case .
|Shell path|| Specify the carapace that will run by default option. IntelliJ IDEA should mechanically detect the default shell based on your environment. here are some examples of different shells :
|Default Tab list||Specify the nonpayment mention for new tabs .|
|audible bell||Play the bell audio on assorted events .|
|Close seance when it ends|| close the stream seance when the corresponding serve ends ( for exercise, by
|Mouse report||Enable the mouse cursor support in the embedded local terminal.|
|copy to clipboard on choice||Copy textbook selected in the terminal to the clipboard .|
|paste on middle mouse clitoris click||Paste clipboard contents by clicking the middle mouse button .|
|Override IDE shortcuts||Use shell-specific shortcuts rather of IDE shortcuts when the Terminal creature window is active. Click Configure terminal keybindings to open the Keymap settings page and configure the shortcuts that are available int the Terminal creature window under Plugins | Terminal. For exemplar, Switch Focus to Editor is mapped to Escape by default option, which means that if you do n’t override the IDE shortcuts, Escape will switch concenter from the terminal to the editor .|
|Shell consolidation|| Integrate the terminal with the arrangement shell to by rights keep traverse of your command history for sessions and load a customs config file with ask environment variables. Shell consolidation works for
|Highlight hyperlinks||Highlight HTTP links in the terminal and make them clickable .|
|Use Option as Meta key||On macOS, use the Option key as the Meta key .|
|Run Commands using IDE||Detect and highlight commands that can be used as IDE features rather of running them in the terminal and take comfort output. When enabled, rather of pressing Enter, which runs the command in the terminal, urge Ctrl+Enter to open the corresponding GUI chemical element. For more data, see Run IDE features from the concluding .|
|Cursor shape||Select the shape of the cursor : block, underscore, or vertical .|
|Activate virtualenv|| For the Python interpreter being a virtual environment, with this checkbox selected, the virtual environment is automatically activated (
The implant terminal copycat besides inherits the pursuit IDE settings :
- On the Keymap page, you can configure the copy Ctrl+C and paste Ctrl+V shortcuts .
- On the Editor | General | Appearance page, you can configure wink frequency for the caret. The Terminal does not inherit the Use obstruct caret choice because there is a discriminate choice for that : Cursor shape .
- On the Editor | Color Scheme | Console Font page, you can configure line spacing and fonts .
- On the Editor | Color Scheme | Console Colors page, you can configure baptismal font colors .
- On the Editor | Color Scheme | General page, you can configure the selection foreground and background colors .
Run IDE features from the terminal
alternatively of running a specific command in the integrate terminal and read comfort output, you can use the relevant IDE sport, like a tool window or a dialogue that implements this functionality. For example, the diff viewer actually runs the
diff control in the arrangement husk to produce results. Another example is the Log check in the Git tool windowpane, which is based on the output of the
git log command .
Open the Log tab of the Git tool window from the terminal
- Type a defend command in the terminal and detect how it is highlighted .
- alternatively of pressing Enter, which runs the command in the terminal, press Ctrl+Enter to open the equate GUI component. In this exercise, it will open the Log tab of the Git tool window and filter commits by authors with “ dmitry ” in their usernames .
This feature besides works with most of the commands recognized by Run Anything ( crush Ctrl doubly ), such as
rails, and therefore on, depending on what plugins you have installed. To run a highlight command in debug mood ( use the Debug tool windowpane rather of Run ) weight-lift Ctrl+Shift+Enter.
If you want to disable this feature, click on the style bar of the Terminal window and clear the Run Commands using IDE option. concluding modified : 29 April 2022