In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I would like to talk to you about how to understand Windows Terminal. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something from this article.
We will explore Windows Terminal, which is an ideal match for WSL2. It is fast, configurable, beautiful, and provides all the advantages of Windows and Linux development.
Windows has fully embraced Linux, and WSL2 makes it a seamless pleasure.
You can access the terminal of the distribution in the following ways:
Click its start menu icon
Enter wsl or bash at the Powershell or command prompt
Use third-party terminal options (such as Cmder,ConEmu and Hyper) by starting the configuration file for% windir%\ system32\ bash.exe ~
Set Linux as the default shell in VS Code by pressing Ctrl + Shift + P, then entering / selecting the terminal Terminal: Select Default Shell, and then selecting WSL Bash.
Windows Terminal offers more options, but you won't regret installing it. New application features.
Support for WSL2,SSH,Powershell,cmd and other command lines
Multiple tabs and split panes
Search box
Custom key binding
GPU accelerates text rendering
Beautiful new font Cascadia Code
Low resource usage (usually 10MB per tab)
Automatic updates (if using Microsoft Store)
Okay, documentation.
It is open source!
How to install Windows Terminal
The easiest way to install Windows Terminal is through Microsoft Store:
Ms-windows-store://pdp/?ProductId=9n0dx20hk701
If this link fails, try opening Microsoft Store in your browser, or start the Microsoft Store application from the Windows start menu and search for "Terminal".
Note: be careful not to select early "Windows Terminal Preview" applications.
Click Get and wait a few seconds to complete the installation.
If you don't have access to 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 Lock to start or more, and then select Lock to Taskbar.
Getting started with Windows Terminal
The first time it runs, Windows Terminal starts with Powershell as the default configuration file. The drop-down menu can be used to launch other tabs and access settings:
The terminal will automatically generate configuration files for all WSL distributions and Windows shell you install, although you can disable generation in the global settings.
Manage labels and panes
Open a new label for the default profile by clicking the + icon or Ctrl + Shift + T. To open a label for other personal data, select the label from the drop-down menu, or press Ctrl + Shift + N, where N is the number of the profile.
Press Alt + Shift + D to copy and split the panes. Each time you use it, the active pane is divided into two parts along the longest axis:
Force creation:
In the vertical pane, press Alt + Shift + or
Horizontal pane, press Alt + Shift +-
To open another profile in the new pane, hold down the Alt key while selecting from the drop-down menu.
Hold down the Alt key and use the cursor key to switch between the active panes on the keyboard. You can resize the pane by holding down Alt + Shift and using the cursor keys to resize accordingly.
You can rename the tab by double-clicking the text, and you can change the name or color by right-clicking the tab and selecting the menu option:
This only affects the current tab; it does not permanently change the profile.
To close the active pane or tab, press Alt + Shift + W or enter the terminal's standard exit command (usually exit).
Font size
You can use Ctrl + + and Ctrl +-to resize the text of the active terminal. Alternatively, hold down Ctrl and scroll the mouse wheel.
Rolling
Use the scroll bar to browse the terminal output. Alternatively, hold down the Ctrl key, press the cursor up, cursor down, Page Up, or Page Down key, and use the keyboard to navigate.
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, respectively, although Ctrl + C and Ctrl + V are also available.
Note: be aware that Ctrl + C can terminate Linux applications, so it is recommended to use Shift.
A copy on automatic selection option is provided in the global settings, and you can paste the current clipboard item by right-clicking.
Configuration
The settings can be accessed from the drop-down menu or Ctrl +, (comma). This configuration is defined in a single settings.json file, so you may be prompted to select a text editor. VS Code is a good choice, but if you want to edit without color coding and syntax checking, notepad is fine.
Settings.json controls:
Global settings global settings, applicable to all profiles
Profile settings profile settings, used to define profile
Custom color scheme settings custom color scheme settings, as well as keybinding settings keyboard binding settings
The file uses the following format:
/ / This file was initially generated by Windows Terminal {/ / general settings, e.g. "initialRows": 40, / / profile settings "profiles": {"defaults": {/ / settings that apply to all profiles} "list": [/ / list of individual profiles, e.g. {"guid": "{81d1dceb-c123-5678-90a1-123abc456def}", "name": "Windows PowerShell" "commandline": "powershell.exe"}, {"guid": "{91d1dceb-c123-5678-90a1-123abc456def}", "name": "Ubuntu", "source": "Windows.Terminal.Wsl"}]} / / custom color schemes, e.g. "schemes": [{"name": "My new theme" "cursorColor": "# FFFFFF", "selectionBackground": "# FFFFFF", "background": "# 0C0C0C", "foreground": "# CCCCCC"}], / / custom keybindings, e.g. "keybindings: [{" command ":" find "," keys ":" ctrl+shift+f "}]}
The default value is defined in defaults.json. When you click Settings in the drop-down menu, hold down Alt to open it.
Warning: do not change the default file! Use it to view the default settings and to add or change settings in settings.json if necessary.
Global configuration
The following global settings are the most useful, although more global settings are documented in the Windows terminal documentation.
DefaultProfile defines the GUID that is used as the default profile when starting Windows Terminal.
Setting copyOnSelect to true automatically copies the selected text to the clipboard without pressing Ctrl + Shift + C.
Set copyFormatting to false to copy only plain text without any style. I hope this is the default setting for all applications
Set initialColumns and initialRows to the number of characters in horizontal and vertical dimensions.
You can set tabWidthMode to:
Equal: each tab has the same width (default)
TitleLength: each tag is set to the width of its title, or
Compact: inactive tabs shrink to the width of their icons.
DisabledProfileSources sets up an array to prevent automatic generation of configuration files. For example:
"disabledProfileSources": ["Windows.Terminal.Wsl", "Windows.Terminal.Azure", "Windows.Terminal.PowershellCore"]
This will disable all generated configuration files and delete any one you want to keep.
Profile profile Settings
Define the new configuration file by creating an object group in the profile, list array. An example of WSL2 Ubuntu.
{"guid": "{91d1dceb-c123-5678-90a1-123abc456def}", "name": "Ubuntu", "source": "Windows.Terminal.Wsl", "startingDirectory": "/ / wsl$/Ubuntu/home/username/", "colorScheme": "Tango Dark", "useAcrylic": true, "acrylicOpacity": 0.75, "hidden": false}
Each profile is defined with the following settings:
Topic-specific settings include:
Finally, add "experimental.retroTerminalEffect": true to the configuration file to achieve a retro CRT effect!
Color scheme settings
You can set the "colorScheme" of each profile to the name of any color scheme contained in the defaults.json. For example:
"Campbell":
"Campbell Powershell":
"One Half Dark":
"One Half Light":
"Tango Dark":
"Tango Light":
"Vintage"
Create your own color scheme
You can define your own solution objects in the "schemes" array of settings.json. Each color is defined by a hexadecimal value. For example:
"schemes": [{"name": "My New Theme", "foreground": "# EEEEEE", "background": "# 111111", "cursorColor": "# FFFFFF", "black": "# 000000", "red": "# CC0000", "green": "# 4E9A06", "yellow": "# C4A000", "blue": "# 3465A4" "purple": "# 75507B", "cyan": "# 06989A", "white": "# EEEEEE", "brightBlack": "# 555753", "brightRed": "# EF2929", "brightGreen": "# 8AE234", "brightYellow": "# FCE94F", "brightBlue": "# 729FCF", "brightPurple": "# AD7FA8", "brightCyan": "# 34E2E2" "brightWhite": "# FFFFFF"}]
You can then use this scenario by adding its "name" to the colorScheme setting of the configuration file. For example:
"colorScheme": "My New Theme"
Keyboard binding Settings
The "keybindings" array in settings.json overrides or complements the default key bindings set in defaults.json. Each key binding is defined as an object with a combination of "command" and "keys". For example:
/ / Ctrl + Shift + F to open the search box {"command": "find", "keys": "ctrl+shift+f"}
In some cases, "command" can be an application "action" with one or more parameters. For example:
/ / Ctrl + Shift + 1 to open the first profile in a new tab {"command": {"action": "newTab", "index": 0}, "keys": "ctrl+shift+1"}
The "keys" value accepts the modifiers ctrl +, shift + and alt +, followed by:
For example, if you want to open the search box using Ctrl + F, you can add a line to the "keybindings" array in settings.json: tab
"keybindings": [{"command": "find", "keys": "ctrl+f"}]
The search box will also open with Ctrl + Shift + F because this setting is defined in defaults.json-unless you assign the key combination to another command.
Command line options
You can start the Windows terminal from a shortcut or any Windows or Linux terminal by running wt.exe. The following options are supported:
You can also pass a list of commands separated by semicolons. Commands are used to define new tabs and panes and other control parameters:
Examples
The following example must be executed from a standard cmd command line or shortcut.
Open the Windows terminal using the Ubuntu and Windows Powershell tabs:
Wt-p "Ubuntu"; new-tab-p "Windows PowerShell"
Open the Windows terminal in a separate pane using Ubuntu,Windows Powershell and the command prompt configuration file:
Wt-p "Ubuntu"; split-pane-V-p "Windows PowerShell"; split-pane-H-p "Command Prompt"
More examples for launching Windows Terminal from Linux Shell or Powershell are provided in the Windows Terminal documentation.
After reading the above, do you have any further understanding of how to understand Windows Terminal? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.