Перейти к содержимому

Windows terminal что это

  • автор:

Windows Terminal — загрузка, настройка, использование

Обзор Windows Terminal

Впервые новая оболочка для команд Windows 11 и Windows 10 была представлена в мае 2020, а уже осенью была выпущена первая стабильная версия. С тех пор Windows Terminal продолжает обновляться, но уже сейчас более чем пригоден к работе как с командной строкой или PowerShell, так и другими оболочками, например, Ubuntu, установленной в рамках WSL (Подсистема Windows для Linux).

В этом обзоре — базовые сведения о том, где скачать и как настроить Windows Terminal, о некоторых его возможностях и дополнительная информация, которая может оказаться полезной.

Где скачать Windows Terminal

Прежде чем приступить, два важных примечания: в Windows 11 Терминал Windows уже встроен (нажмите правой кнопкой мыши по кнопке Пуск и вы сможете его запустить), а для работы нового терминала в Windows 10 требуется версия 1903 или новее.

Бесплатно скачать Windows Terminal можно из двух официальных источников:

Скачать Windows Terminal из Microsoft Store

  • Microsoft Store — достаточно ввести Windows Terminal в поиске магазина или перейти на страницу приложения https://www.microsoft.com/ru-ru/p/windows-terminal/9n0dx20hk701
  • Загрузить последний релиз из GitHub, скачиваем файл .msixbundle из раздела Assets и устанавливаем его как обычное приложение — https://github.com/microsoft/terminal/releases/

После установки Windows Terminal готов к работе — можно запускать. При первом старте по умолчанию будет открыта вкладка с PowerShell.

Главное окно Windows Terminal

Использование Windows Terminal, возможности управления

Скорее всего, с открытием новых вкладок с командной строкой, PowerShell и другими оболочками проблем не возникнет, достаточно нажать «+» если требуется открыть новую вкладку с консолью по умолчанию, либо по стрелке и выбрать нужную оболочку, там же можно увидеть и сочетания клавиш для быстрого открытия соответствующих новых вкладок.

Открытие новых вкладок и выбор оболочек

Не будем торопиться с переходом к настройкам Windows Terminal, для начала некоторые вещи, которые вы можете сделать, не переходя к ним:

  1. Сочетания клавиш Ctrl + «+» и аналогичное сочетание с клавишей «минус» позволяет изменить размер текста в текущей вкладке. Масштаб в Windows Terminal
  2. Нажмите клавиши Alt+Shift+D, чтобы разделить текущую вкладку на две панели. Действие можно повторять: выделенная панель будет разделяться при нажатии этих клавиш. Если вместо D использовать клавишу «минус» или «плюс», разделение будет происходить горизонтально и вертикально соответственно. Несколько панелей в Windows Terminal
  3. Для панелей доступны и другие клавиши: Ctrl+Shift+W — закрыть текущую, Alt+Shift+стрелки — изменение размеров, Alt+стрелки — переключение между панелями.
  4. Если в Windows включены эффекты прозрачности, удержание клавиш Ctrl+Shift и вращение колеса мыши вниз позволяет сделать активное окно Windows Terminal более прозрачным.
  5. Windows Terminal добавляет пункт в контекстное меню Windows, позволяющий быстро запустить оболочку по умолчанию в текущей вкладке. Запуск из контекстного меню
  6. «Стандартные» сочетания клавиш, такие как копирование и вставка, отмена (Ctrl+Z) и другие здесь также исправно работают.
  7. Если вам нужно запустить Windows Terminal от имени администратора, можно использовать правый клик по нему в меню «Пуск» и выбор нужного пункта в разделе «Дополнительно» или, поиск в панели задач, как на изображении ниже. Запустить Windows Terminal от имени администратора

Настройки

Зайти в настройки Windows Terminal можно, нажав по кнопке со стрелкой или же с помощью сочетания клавиш Ctrl + «запятая». Параметры меняются от версии к версии и на момент написания этого обзора выглядят следующим образом:

Параметры Windows Terminal

Большинство вкладок вполне понятны и на русском языке:

  • На вкладке «Запуск» можно выбрать оболочку по умолчанию, например, выбрать «Командная строка» вместо «Windows PowerShell», включить автозапуск, изменить режим запуска.
  • Вкладки «Оформление» и «Цветовые схемы» позволяют изменить общие параметры оформления приложения, а также отредактировать цветовые схемы (их мы можем указать отдельно для каждой консоли в разделе «Профили»), при необходимости — создать собственную цветовую схему.
  • В разделе «Действия» — базовые сочетания клавиш для работы в Windows Terminal. Эти сочетания подлежат редактированию в файле конфигурации.
  • Если перейти в подраздел «Профили», мы можем настроить отдельные параметры оформления, запуска, значка, папки запуска, прозрачности и другие для каждой «командной строки». В оформлении можно не только выбрать цветовую схему и настроить прозрачность (акриловый эффект), но и задать обои для соответствующих вкладок. Настройка профиля в Windows Terminal
  • Настройки в достаточной мере гибкие и скриншот ниже — далеко не всё, чего можно добиться. Вариант оформления в Windows Terminal
  • При нажатии кнопки «Добавить», вы можете добавить собственную консоль в Windows Terminal (или использовать системную — тот же PowerShell или Командную строку, но с другим профилем настроек).
  • Кнопка «Открытие файла JSON» позволяет открыть файл конфигурации для редактирования.

Если после проделанных экспериментов с настройками вам потребуется сбросить все параметры Windows Terminal на настройки по умолчанию, достаточно проделать следующие шаги:

Windows Terminal установка и настройка

Оказывается Microsoft выпустили неплохой интерфейс для командной строки, который поддерживает cmd и PowerShell. Это заметка про его установку и настройку.

Скачать Windows Terminal можно установить, как из магазина приложений Windows, так и скачать с Github, хотя в этом случае обновлять его придется вручную.

После установки я настроил себе тему Dracula. Для этого нужно отредактировать файл settings.json.

Также мне очень хотелось иметь контекстное меню “Open Terminal here” в проводнике Windows. Из коробки такая опция не предоставляется, но если очень захотеть, можно в космос полететь. Обсуждение этой опции вот здесь, решение вот здесь. Итак, работать дальше будем в cmd, а не в PowerShell. Проверим, работают ли у нас переменные:

Если команда echo выводит правильные паки: %USERPROFILE% → C:\Users[userName] %LOCALAPPDATA% → C:\Users[userName]\AppData\Local То все в порядке. Для начала создадим папку, куда мы положим иконку:

Затем скопируем в эту папку, свежесозданную папку, иконку wt_32.ico из репозитория Microsoft.

Windows Terminal: A Must-Have Productivity Tool for Windows Programmers

Tips and tricks of using the new tool windows terminal to manage your programming work

Analytics Vidhya

As a programmer, we often need to use different command-line tools, like command prompt (CMD), PowerShell, Anaconda, google cloud SDK, Azure SDK, etc.. All these tools are pretty much independent from each other. You may feel that you can manage all these by yourself. However, I am sure that the integration tool Windows Terminal will be a game-changer of your programming productivity. Let’s check out Windows Terminal.

Features of Windows Terminal

Windows Terminal is a contemporary terminal application for users of command-line tools and shells like command Prompt, PowerShell, and Windows Subsystem for UNIX (WSL ). Microsoft made the initial release in May 2019, the preview release in July 2020, and the first stable release in August 2020.

Windows Terminal has the following important features: include the integration of any command-line tools, multiple tabs, Unicode and UTF-8 character support, a GPU accelerated text rendering engine, and the ability to create your customized themes, text, colors, backgrounds.

Let’s install it first and then explore several key features.

Installation of Windows Terminal

The installation of Windows Terminal is super easy and fast. You can install Windows Terminal through Microsoft store with one click.

How to Integrate All the Command-line Tools

The initial installation of Windows Terminals by default includes Command Prompt, Windows PowerShell, Azure Cloud Shell, and Ubuntu. We can add other frequent used tools to it. Below is the screenshot of some tools that I have added to my Windows Terminal:

As you can see from the screenshot, I have added Anaconda, gcloud SDK, Git Bash, and PuTTY. I will use Anaconda as the example to walk through how we can add a new application to Windows Terminal.

By clicking ‘Settings’ on the menu, your computer will use microsoft visual studio to open the configuration file (settings.json) which you will find the profiles setting listing all the you have currently include in Windows Terminal. You can add any other tools by inserting an item to the list. Below is the item that I add for Ananconda:

On ‘guid’: you can generate a new guid in PowerShell through the following code:

You can just copy and paste the generated guid to this new item.

You can give the name at your will. I name the link as ‘Anaconda’.

The next key thing is the ‘commandline’ info. To find out this info, we first go to the system menu and right click ‘Anaconda Prompt (Anaconda3)’ to ‘open file location’ as below:

In the file location folder, we will see all the shortcut under Anaconda. Continuing right click of ‘Anaconda Prompt (Anaconda3)’, we can get the following screenshot:

The commandline info should come from the ‘Target’ box and the “startingDirectory” comes from ‘Start in’ box.

Other information like icon are optional. You can customize the icon at your will.

We can use the same approach to add the shortcut for ‘google cloud SDK shell.’ You may get the info as below:

The git bash info may look as below:

and the PuTTY info may look as

Based on the order of all the applications, Windows Terminal automatically create the shortcut for each app: ctrl + shift + number 1, 2, …n

Feature: Search Command History

You may have typed many command lines during your work session and often you would like to reuse some of the commands. It may take you lots of time to find the right history by scrolling the history. With Windows Terminal, you can quickly locate the command lines by keybinding ‘Ctrl+Shift+F’ to open the historical commands search box.

Feature: Multiple Tabs

We often need to open many applications concurrently. It may waste some of time to navigate between so many open application windows. Windows Terminal Mutiple tabs feature can help organize and manage these applications much better. With the preselected icons, we can easily identify the application we want to select. We can also rename the tabs or color-coding the tabs to help us distinguish the tabs. With the same tab, we can also use multiple panes within the same tab. You can refer to https://docs.microsoft.com/en-us/windows/terminal/tips-and-tricks for more details.

Feature: Windows Terminal Panes

Sometimes you may want to open several panes in the same tab. You can do that through Windows Terminal Panes. Panes give you the ability to run several command-line applications within the same tab next to each other.

‘alt + shift + +’: create a new vertical pane in the current pane.

‘alt + shift + -’: create a new horizontal pane in the current pane.

‘ctrl + shift + w’: close the current pane.

All these settings are configured in the keybindings section. You can refer to the documentation page for more details.

By exploring these wonderful features, we can find that all these features are clearly defined in the setting file. We can even try to define some customized features following the same approach.

The Windows Terminal

The Windows Terminal

Microsoft is working on a new command line application called Windows Terminal.

The promo video looks very promising, let’s hope it lives up to expectations.

The Windows Terminal released and will have monthly updates starting in July 2020.

Installation

The Windows Terminal is available on the Windows Store.

store listing

The Terminal can also be manually installed via the GitHub releases page or via the Windows Package Manager (winget).

If you install Terminal manually:

  • Be sure to install the Desktop Bridge VC++ v14 Redistributable Package.
  • Terminal will not auto-update!

Features

The old, well known, often despised, cmd application is not very feature rich. Its main goal is to remain backwards compatible, preventing many features from being added.

The new Windows Terminal, however, has a lot of bells and whistles.

It’s a central location to access many different shells like the good ‘ol cmd, PowerShell, your fancy WSL shell, …

The project is open-source. Take a look at the, mainly C++ repository.

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.

The Windows Terminal README.md

The Terminal will also need to meet our goals and measures to ensure it remains fast, and efficient, and doesn’t consume vast amounts of memory or power.

The Windows Terminal README.md

Many additional features are coming.

Those 2 examples are available right now.

For a full(er) look at what is available in the 1.0 release, have a gander at the milestones.

Even more features are on the developers’ nice-to-have list and may be coming.

Like a dev that thinks supporting themes with .itermscolors files would be cool.
Will that become a reality? No idea.
Would it be cool? Absolutely! ��

Configuration

There are many configuration options to make the overall application, and each shell, act/look like you want. This happens in a settings.json file.

Edit: They did ��!
A JSON-schema was added in version 1909. This brings me great joy.

A GUI is also confirmed as “coming soon”.

Defaults

When you first install the application, it will present you with a PowerShell window.

default PowerShell

Having recently put in some time to get the Windows subsystem for Linux 2 up and running, I want it to show that instead when I launch the terminal.

shell list clicking the dropdown

Open the settings.json file by clicking settings option in the dropdown, or by hitting the ctrl+, shortcut.

By default, that shell opens with your user-directory on Windows as location. My projects are located on the Linux side, so I want the shell to open in my Ubuntu home directory.

Flexibility

After some more tweaking, I think my terminal looks pretty sweet.
I saved my settings.json to a public gist.

A developer named Chris Duck made a PowerShell module to control this: MSTerminalSettings.

Remember the dev that thought using iTerm color scheme files would be neat? Yeah, this module makes that possible. ��
Chris lists using schemes from iterm2colorschemes.com as an example of what his module can do.

Scott Hanselman and Tyler Leonhardt immediately used it for the best of reasons, shenanigans.

They made Terminal Attract Mode. The self proclaimed “greatest PowerShell script ever written, today” places animated gifs as the background of your terminal. It’s glorious. ��

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *