microsoft / terminal

Microsoft / Terminal

Welcome to the Windows Terminal, Console and Command-Line repo. 欢迎来到 Windows Terminal、Console 和命令行存储库。

Installing and running Windows Terminal

安装并运行 Windows Terminal

Microsoft Store [Recommended] Microsoft Store [推荐]

Install the Windows Terminal from the Microsoft Store. This allows you to always be on the latest version when we release new builds with automatic upgrades. This is our preferred method. 请从 Microsoft Store 安装 Windows Terminal。这样,当我们在发布新版本时,您可以自动升级并始终保持在最新版本。这是我们首选的安装方式。


Other install methods

其他安装方式

Via GitHub 通过 GitHub

For users who are unable to install Windows Terminal from the Microsoft Store, released builds can be manually downloaded from this repository’s Releases page. Download the Microsoft.WindowsTerminal_<versionNumber>.msixbundle file from the Assets section. To install the app, you can simply double-click on the .msixbundle file, and the app installer should automatically run. 对于无法从 Microsoft Store 安装 Windows Terminal 的用户,可以从本存储库的“Releases”页面手动下载已发布的版本。请从 Assets 部分下载 Microsoft.WindowsTerminal_<versionNumber>.msixbundle 文件。要安装该应用,只需双击 .msixbundle 文件,应用安装程序应会自动运行。

If that fails for any reason, you can try the following command at a PowerShell prompt: 如果因任何原因安装失败,您可以在 PowerShell 提示符下尝试以下命令:

# NOTE: If you are using PowerShell 7+, please run
# Import-Module Appx -UseWindowsPowerShell
# before using Add-AppxPackage.
Add-AppxPackage Microsoft.WindowsTerminal_<versionNumber>.msixbundle

Note: If you install Terminal manually: You may need to install the VC++ v14 Desktop Framework Package. This should only be necessary on older builds of Windows 10 and only if you get an error about missing framework packages. Terminal will not auto-update when new builds are released so you will need to regularly install the latest Terminal release to receive all the latest fixes and improvements! 注意: 如果您手动安装 Terminal,可能需要安装 VC++ v14 Desktop Framework Package。这仅在较旧版本的 Windows 10 上,且在收到关于缺少框架包的错误提示时才需要。Terminal 在发布新版本时不会自动更新,因此您需要定期安装最新的 Terminal 版本以获取最新的修复和改进!


Via Windows Package Manager CLI (aka winget) 通过 Windows Package Manager CLI (即 winget)

winget users can download and install the latest Terminal release by installing the Microsoft.WindowsTerminal package: winget 用户可以通过安装 Microsoft.WindowsTerminal 包来下载并安装最新的 Terminal 版本:

winget install --id Microsoft.WindowsTerminal -e

Note: Dependency support is available in WinGet version 1.6.2631 or later. To install the Terminal stable release 1.18 or later, please make sure you have the updated version of the WinGet client. 注意: 依赖项支持在 WinGet 1.6.2631 或更高版本中可用。要安装 Terminal 1.18 或更高版本的稳定版,请确保您已更新 WinGet 客户端。


Via Chocolatey (unofficial) 通过 Chocolatey (非官方)

Chocolatey users can download and install the latest Terminal release by installing the microsoft-windows-terminal package: Chocolatey 用户可以通过安装 microsoft-windows-terminal 包来下载并安装最新的 Terminal 版本:

choco install microsoft-windows-terminal

To upgrade Windows Terminal using Chocolatey, run the following: 要使用 Chocolatey 升级 Windows Terminal,请运行:

choco upgrade microsoft-windows-terminal

If you have any issues when installing/upgrading the package please go to the Windows Terminal package page and follow the Chocolatey triage process. 如果您在安装/升级包时遇到任何问题,请前往 Windows Terminal 包页面并遵循 Chocolatey 的分类处理流程。


Via Scoop (unofficial) 通过 Scoop (非官方)

Scoop users can download and install the latest Terminal release by installing the windows-terminal package: Scoop 用户可以通过安装 windows-terminal 包来下载并安装最新的 Terminal 版本:

scoop bucket add extras
scoop install windows-terminal

To update Windows Terminal using Scoop, run the following: 要使用 Scoop 更新 Windows Terminal,请运行:

scoop update windows-terminal

If you have any issues when installing/updating the package, please search for or report the same on the issues page of Scoop Extras bucket repository. 如果您在安装/更新包时遇到任何问题,请在 Scoop Extras 存储库的 issues 页面搜索或报告相关问题。


Installing Windows Terminal Canary

安装 Windows Terminal Canary

Windows Terminal Canary is a nightly build of Windows Terminal. This build has the latest code from our main branch, giving you an opportunity to try features before they make it to Windows Terminal Preview. Windows Terminal Canary is our least stable offering, so you may discover bugs before we have had a chance to find them. Windows Terminal Canary 是 Windows Terminal 的每日构建版本。该版本包含我们主分支的最新代码,让您有机会在功能进入 Windows Terminal Preview 之前进行试用。Windows Terminal Canary 是我们最不稳定的版本,因此您可能会在我们发现之前就遇到 Bug。


Terminal & Console Overview

Terminal 与 Console 概述

Please take a few minutes to review the overview below before diving into the code: 在深入研究代码之前,请花几分钟时间阅读以下概述:

Windows Terminal Windows Terminal

Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users. It includes many of the features most frequently requested by the Windows command-line community including support for tabs, rich text, globalization, configurability, theming & styling, and more. Windows Terminal 是一款为命令行用户打造的全新、现代、功能丰富且高效的终端应用程序。它包含了 Windows 命令行社区最常请求的许多功能,包括对标签页、富文本、全球化、可配置性、主题与样式等的支持。

The Windows Console Host Windows Console Host

The Windows Console host, conhost.exe, is Windows’ original command-line user experience. It also hosts Windows’ command-line infrastructure and the Windows Console API server, input engine, rendering engine, user preferences, etc. The console host code in this repository is the actual source from which the conhost.exe in Windows itself is built. Windows Console Host (conhost.exe) 是 Windows 最初的命令行用户体验。它还承载了 Windows 的命令行基础设施以及 Windows Console API 服务器、输入引擎、渲染引擎、用户首选项等。本存储库中的控制台主机代码是构建 Windows 系统中 conhost.exe 的实际源代码。