Windows/Terminal: Difference between revisions
| (2 intermediate revisions by the same user not shown) | |||
| Line 27: | Line 27: | ||
# winget install --scope machine Microsoft.WindowsTerminal --source winget | # winget install --scope machine Microsoft.WindowsTerminal --source winget | ||
== Git Bash == | == Git-Bash == | ||
See [[Git-Bash#Windows Terminal Profile]] | See [[Git-Bash#Windows Terminal Profile]] | ||
| Line 44: | Line 44: | ||
* Starting Directory (Optional): You can set a default starting directory for the Git Bash profile (e.g., %USERPROFILE%). | * Starting Directory (Optional): You can set a default starting directory for the Git Bash profile (e.g., %USERPROFILE%). | ||
%USERPROFILE% | %USERPROFILE% | ||
%HOMEDRIVE%%HOMEPATH% | |||
* Icon (Optional): You can set a custom icon for the profile, often found in the Git for Windows installation directory. (or point to C:\Program Files\Git\bin\bash.exe) | * Icon (Optional): You can set a custom icon for the profile, often found in the Git for Windows installation directory. (or point to C:\Program Files\Git\bin\bash.exe) | ||
C:\Program Files\Git\bin\bash.exe | C:\Program Files\Git\bin\bash.exe | ||
better: | |||
"C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico" | |||
-- | -- | ||
Latest revision as of 10:54, 16 February 2026
Windows Terminal
https://github.com/microsoft/terminal
Microsoft Store Install
https://aka.ms/terminal
Download
As of 2024.08.01: (last release was June 27)
https://github.com/microsoft/terminal/releases/tag/v1.21.1772.0 https://github.com/microsoft/terminal/releases/download/v1.21.1772.0/Microsoft.WindowsTerminalPreview_1.21.1772.0_x64.zip
Chocolatey Install
Unofficial method
choco install microsoft-windows-terminal
Winget Install
winget install Microsoft.WindowsTerminal --source winget
# winget install --scope user Microsoft.WindowsTerminal --source winget
Doesn't seem to work?
# winget install --scope machine Microsoft.WindowsTerminal --source winget
Git-Bash
See Git-Bash#Windows Terminal Profile
Open Windows Terminal Settings:
- You can do this by clicking the down arrow next to the new tab (+) button and selecting "Settings," or by pressing Ctrl + ,.
Add a New Profile:
- In the Settings window, navigate to the "Profiles" section and click "Add new" or "New empty profile."
Configure the Profile:
- Name: Give the profile a descriptive name, such as "Git Bash."
Git Bash
- Command Line: Specify the path to your bash.exe within your Git for Windows installation. A common path is:
C:\Program Files\Git\bin\bash.exe --login
- Starting Directory (Optional): You can set a default starting directory for the Git Bash profile (e.g., %USERPROFILE%).
%USERPROFILE% %HOMEDRIVE%%HOMEPATH%
- Icon (Optional): You can set a custom icon for the profile, often found in the Git for Windows installation directory. (or point to C:\Program Files\Git\bin\bash.exe)
C:\Program Files\Git\bin\bash.exe better: "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico"
--
Appearance - Text - Color scheme - Foreground - Green
--
{
...
"profiles":
{
"defaults": {},
"list":
[
{
"commandline": "C:\\Program Files\\Git\\bin\\bash.exe --login",
"foreground": "#13A10E",
"guid": "{db90ebd1-5845-4be9-a45a-404a02d221ff}",
"hidden": false,
"icon": "C:\\Program Files\\Git\\bin\\bash.exe",
"name": "Git Bash",
"startingDirectory": "%USERPROFILE%"
}
[
}
}
multiLinePasteWarning
Warning
You are about to paste text that contains multiple lines. If you paste this text into your shell, it may result in the unexpected execution of commands. Do you wish to continue?
To change these settings (add to settings.json by doing the following)...
Edit settings.json:
- Hold down the Shift key while selecting Settings in the Windows Terminal dropdown menu. This will open the editor associated with json files, typically Visual Studio Code if installed.
- or in newer versions, go to settings and click the "Open JSON file" in the bottom left
At the root of your settings.json (not under any other key, just inside the first level of brackets), add:
{
"multiLinePasteWarning": false,
Open settings with "Ctrl+," then select "Open JSON file" at the bottom left. Or hold down the shift key while selecting settings in the Terminal drop down menu. C:\Users\USER\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
ref:
- https://superuser.com/questions/1677982/how-do-i-get-windows-terminal-to-stop-asking-me-every-time-i-paste-something-int
- https://learn.microsoft.com/en-us/windows/terminal/customize-settings/interaction#warn-when-the-text-to-paste-contains-multiple-lines
Select All Hot Key
Default is Ctrl + Shift + A. Change this by:
settings.json
{
...
"keybindings":
[
{
"id": "Terminal.CopyToClipboard",
"keys": "ctrl+c"
},
{
"id": "Terminal.PasteFromClipboard",
"keys": "ctrl+v"
},
{
"id": "Terminal.SelectAll",
"keys": "ctrl+a"
},
{
"id": null,
"keys": "ctrl+shift+a"
}
],
...
}
If you prefer to use the more traditional Ctrl + A shortcut (which is sometimes used in shells like PowerShell to select the current command line only), you can modify the key binding in the Windows Terminal settings:
- Open the Windows Terminal Settings by pressing Ctrl + , or selecting Settings from the dropdown menu.
- Go to the Actions section.
- Scroll down to the "Select all text" action.
- Click the pencil icon to edit the shortcut.
- Press your desired new shortcut (e.g., Ctrl + A) and click the checkbox to save.
- Click Save in the bottom right corner of the Settings tab
Note: you can also "copy" the highlighted section by right clicking. Careful, as this is also "paste", if nothing is highlighted.