Book Image

Windows Terminal Tips, Tricks, and Productivity Hacks

By : Will Fuqua
5 (1)
Book Image

Windows Terminal Tips, Tricks, and Productivity Hacks

5 (1)
By: Will Fuqua

Overview of this book

Windows Terminal is a new and open-source command-line application for Windows 10, built for the Command Prompt, PowerShell, Windows Subsystem for Linux, and more. It's fast, modern, and configurable thanks to its GPU-accelerated rendering, excellent UTF-8 support, and JSON-based configurability, and this book can help you learn how to leverage these features. You’ll start by learning the benefits of Windows Terminal and its open-source development, as well as how to use the built-in tabs, panes, and key bindings to build your own efficient terminal workflows. After you’ve mastered Windows Terminal, this book shows how to use and configure PowerShell Core and the Windows Subsystem for Linux within Windows Terminal. You’ll maximize your productivity using powerful tools such as PSReadLine for PowerShell and ZSH on Linux, and discover useful tips and tricks for common developer tools like Git and SSH. Finally, you’ll see how Windows Terminal can be used in common development and DevOps tasks, such as developing frontend JavaScript applications and backend REST APIs, and managing cloud-based systems like Amazon Web Services (AWS), Microsoft Azure, and Google Cloud. By the end of this book, you'll not only be well-versed with Windows Terminal, but also have learned how to effectively use shells like PowerShell Core and ZSH to become proficient at the command line.
Table of Contents (20 chapters)
1
Section 1: Introducing the New Windows Terminal
5
Section 2: Configuring your Windows Terminal and its shells
12
Section 3: Using your Windows Terminal for development

Launching Windows Terminal

It's worth spending some time reviewing how to efficiently start our Windows Terminal, as it's something we'll be doing frequently!

The normal way to start Windows Terminal is to select it from the Start menu, either by selecting the icon using the mouse or typing out the words windows terminal in the Start menu search bar.

Luckily, there are faster ways. Windows Terminal ships with a binary, wt.exe, that can be used to quickly start the terminal. Press wt<enter> from the Start menu, Run dialog, or Windows Explorer location bar to open the terminal. wt.exe has several interesting command-line flags, such as -F to launch in fullscreen mode. We'll learn more about the capabilities of wt.exe in Chapter 6, Setting up keyboard shortcuts.

An additional way to start Windows Terminal is to use the taskbar keyboard shortcuts, such as Win + 1, Win + 2, and so on. Pin the application to the taskbar by finding the Windows Terminal application in the Start menu, right-clicking it, and choosing Pin to taskbar. Then, on the taskbar, drag the Windows Terminal icon all the way to the left so it's the leftmost icon. Now, pressing Win + 1 will launch Windows Terminal, or bring it into the foreground if it's already open:

Figure 1.13 –Windows Terminal pinned to the taskbar in the first position

Figure 1.13 –Windows Terminal pinned to the taskbar in the first position

Now that we have the Windows Terminal pinned to the taskbar, we can right-click on the icon to open a Jump List Menu, where we can open Windows Terminal directly to our desired shell:

Figure 1.14 – The Windows 10 Jump List for the Windows Terminal

Figure 1.14 – The Windows 10 Jump List for the Windows Terminal

The final way we'll learn to open Windows Terminal is from Windows Explorer. Open Windows Explorer (Win + E) and then right-click any directory. Select the Open in Windows Terminal menu item to open that directory in Windows Terminal. Additionally, right-clicking or pressing Shift and right-clicking on the background of Windows Explorer shows an Open Windows Terminal here menu option that will open the current directory in Windows Terminal:

Figure 1.15 – The Open in Windows Terminal context menu item

Figure 1.15 – The Open in Windows Terminal context menu item