Windows Terminal: The Perfect Partner of WSL2
This article will explore in-depth Windows Terminal, which is an ideal companion for WSL2. It is fast, configurable, beautifully designed, and has all the benefits of Windows and Linux development.
Windows has completely embraced Linux, and WSL2 makes it extremely smooth.
You can access the distribution's terminal in the following ways:
- Click its Start menu icon.
- Enter
wsl
orbash
in PowerShell or command prompt. - Use third-party terminal options such as Cmder, ConEmu, and Hyper, and use the configuration file that launches
%windir%system32bash.exe ~
. - Set Linux settings in VS Code by pressing Ctrl Shift PP > and type/select "Terminal: Select Default Shell" and select WSL Bash is the default shell.
Windows Terminal (available from the Microsoft Store) offers another option, but you won't regret installing it. Features of this new app include:
- Supports WSL2, SSH, PowerShell, cmd and other command lines.
- Multiple tabs and split panes.
- Configurable theme, background image and transparent effects.
- Search box.
- Custom key binding.
- GPU accelerates text rendering.
- Fine new font Cascadia Code.
- Low resource usage (usually 10MB per tab).
- Automatically updated (if using the Microsoft Store).
- Perfect documentation.
- It is open source!
Key Points
- Windows Terminal is a fast and configurable terminal application that supports WSL2, SSH, PowerShell, cmd and other command lines, and has multiple tabs, split panes, search boxes, custom key bindings, GPU accelerates text rendering and other functions.
- The application can be installed through the Microsoft Store or downloaded from GitHub, and it includes options for managing tabs and panes, resizing text, scrolling, searching, copying and pasting, and changing settings.
-
settings.json
The settings in Windows Terminal are controlled by a single file that controls global settings, configuration file settings, custom color scheme settings, and key binding settings for all configuration files. -
wt.exe
Windows Terminal also provides command-line options that allow you to start it from a shortcut or any Windows or Linux terminal by running , with the option of maximizing or full-screen boot, and passing a semicolon-delimited list of commands.
How to install Windows Terminal
The easiest way to install Windows Terminal is through the Microsoft Store:
<code>ms-windows-store://pdp/?ProductId=9n0dx20hk701</code>
If this link fails, try opening Microsoft Store in your browser or launching the Microsoft Store app from the Windows Start menu and searching for "Terminal".
Note: Be careful not to select the earlier Windows Terminal Preview application.
Click "Get" and wait for a few seconds to complete the installation.
If you cannot access the Store, you can download the latest version from GitHub.
The Windows Terminal application icon is now available in the Windows Start menu. For easy access, right-click the icon and select Pin to Start or More, and select Pin to Taskbar.
Beginner of Windows Terminal
When the first run, Windows Terminal starts with PowerShell as the default configuration file. You can use the drop-down menu to launch additional tabs and access settings:
Terminal automatically generates configuration files for all installed WSL distributions and Windows shells, although build can be disabled in global settings.
Management Tabs and Panes
Open a new tab for the default profile by clicking the ' icon or Ctrl Shift T>>. To open a tab for a different profile, select it from the drop-down menu or press Ctrl Shift N (where N>> is the number of the configuration file).
Press Alt Shift D
> Copy and split the pane. Each time you use the active pane, it is divided into two parts along the longest axis:
To force creation:
- Vertical pane, press Alt Shift
- , or Horizontal pane, press Alt Shift
>
To open another profile in a new pane, hold down theAlt key when selecting it from the drop-down menu. Press and hold Alt and use the cursor keys to switch the active pane from the keyboard. The pane can be resized by holding down Alt
Shift
and resize accordingly using the cursor keys.
There can be renamed by double-clicking the text. You can also change the name or color by right-clicking on the tab and selecting the menu option:
This will only affect the current tab; it will not permanently change the configuration file. To close the active pane or tab, press Alt Shift W
W>Enter the terminal's standard exit command (usually
exit). Text size Ctrl and Ctrl and
Ctrl -> can be used to adjust the text size of the active terminal. Alternatively, press and hold Ctrl and scroll the mouse wheel.Scroll
Use the scroll bar to browse terminal output. Alternatively, press Ctrl and press up, down, Page Up or Page Down to navigate using the keyboard.
Search
Press Ctrl Shift F>>To open the search box:
Enter any term and use the up and down icons to search for terminal output. Click the Aa icon to activate and deactivate exact case matching.
Copy and paste
By default, copy and paste are bound to Ctrl Shift C and Ctrl Shift V, although Ctrl C and Ctrl V
will also work.Note: Please note that Ctrl C can terminate Linux applications, so it is recommended to use Shift.
The automatic copy selection option is available in the global settings, and you can also paste the current clipboard item by right-clicking the mouse.
Settings
The settings can be accessed through the drop-down menu or Ctrl ,settings.json
(comma). The configuration is defined in a single
settings.json
- Global settings, applied to all configuration files.
- Profile settings, define the configuration file.
- Custom color scheme settings.
- Key binding settings.
This file uses the following format:
<code>ms-windows-store://pdp/?ProductId=9n0dx20hk701</code>
defaults.json
The default value is defined in . Open it by holding down the Alt
defaults
Warning: Do not change settings.json
files! Use it to view the default settings and add or change settings in if necessary.
...(The subsequent content is similar to the original text, but the sentence structure and word use have been adjusted, and some paragraphs have been simplified and merged to maintain the general meaning and picture position of the original text.)
The above is the detailed content of Windows Terminal: The Complete Guide. For more information, please follow other related articles on the PHP Chinese website!

This tutorial guides you through building a serverless image processing pipeline using AWS services. We'll create a Next.js frontend deployed on an ECS Fargate cluster, interacting with an API Gateway, Lambda functions, S3 buckets, and DynamoDB. Th

This pilot program, a collaboration between the CNCF (Cloud Native Computing Foundation), Ampere Computing, Equinix Metal, and Actuated, streamlines arm64 CI/CD for CNCF GitHub projects. The initiative addresses security concerns and performance lim

This Go-based network vulnerability scanner efficiently identifies potential security weaknesses. It leverages Go's concurrency features for speed and includes service detection and vulnerability matching. Let's explore its capabilities and ethical


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1
Easy-to-use and free code editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment