Windows Terminal Tips, Tricks, and Productivity Hacks
eBook - ePub

Windows Terminal Tips, Tricks, and Productivity Hacks

Optimize your command-line usage and development processes with pro-level techniques

Will Fuqua

  1. 254 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Windows Terminal Tips, Tricks, and Productivity Hacks

Optimize your command-line usage and development processes with pro-level techniques

Will Fuqua

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Become an efficient command-line expert by harnessing the power of the new Microsoft Windows Terminal, and learn time-saving tricks for PowerShell, WSL2, and more

Key Features

  • Customize and optimize your Windows Terminal and its shells
  • Work effectively on the command line with split panes, hotkeys, and automation
  • Use PowerShell and WSL2 efficiently to build, test, and deploy applications

Book Description

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.

What you will learn

  • Install, update, and use Windows Terminal and its preview version
  • Customize your Windows Terminal to be both visually appealing and functional
  • Enable and effectively use the latest versions of PowerShell Core and Windows Subsystem for Linux
  • Install and configure time-saving tools for the command line
  • Work efficiently with common developer tools such as Git and SSH
  • Build, deploy, and manage apps in the cloud using Windows Terminal
  • Use Linux tools from Windows with ease

Who this book is for

This book is for developers, DevOps engineers, and sysadmins who want to become advanced command-line power users. Whether you're new to the command line or you already use Windows PowerShell every day, this book will have something for you.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Windows Terminal Tips, Tricks, and Productivity Hacks est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Windows Terminal Tips, Tricks, and Productivity Hacks par Will Fuqua en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Microsoft Programming. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2021
ISBN
9781800209640

Section 1: Introducing the New Windows Terminal

In this section, we'll learn to make efficient use of Windows Terminal. We'll start out learning about what Windows Terminal is and why it's interesting, and then quickly move on to installing and using it. We'll cover all the user interface components of Windows Terminal, including tabs, panes, and the profile menu. We'll also set up an Ubuntu profile using WSL2, so we'll have functioning PowerShell, cmd.exe, and Ubuntu profiles ready to use!
This section comprises the following chapters:
  • Chapter 1, Getting started with the new Windows Terminal
  • Chapter 2, Learning the Windows Terminal UI
  • Chapter 3, Configuring an Ubuntu Linux profile

Chapter 1: Getting started with the new Windows Terminal

At the Build 2019 conference, Microsoft made an exciting announcement: Windows 10 was getting a brand new command-line terminal! Custom built for the command prompt, PowerShell, and the Windows Subsystem for Linux, this new terminal promised to bring a modern, configurable, and open source command-line experience. In May 2020, Microsoft released the 1.0 version of the new Windows Terminal.
Windows Terminal is a separate application from the old Windows command line. This approach allows both terminals to live side by side, and enables Microsoft to rapidly release new features for Windows Terminal without endangering the backward compatibility of the old terminal.
By the end of this chapter, we will be up and running with Windows Terminal, having covered the following topics:
  • Why a new terminal?
  • The modern foundations of Windows Terminal
  • Installing Windows Terminal
  • Launching Windows Terminal
We'll cover why Windows needed a new terminal at all, how this new terminal is radically different from the old one, and take our first steps to download, install, and launch it.

Technical requirements

To get started with Windows Terminal, you'll need a Windows 10 installation with access to the built-in Microsoft Store application. The minimum version of Windows 10 supported is the May 2019 Update (version 1903, as reported in the output of the winver command). If you have a relatively up-to-date Windows 10 installation, you have all the tools you need to get started.

Why a new terminal?

Microsoft's old terminal, conhost.exe, has been showing its age. While it has seen some impressive improvements lately, such as ANSI/VT support and advanced settings, the primary goal of conhost.exe is to be backward-compatible with older applications. This backward-compatibility constraint can sometimes be at odds with the fast-paced improvements in other parts of Windows 10.
While both PowerShell and the shells running under Windows Subsystem for Linux (WSL) have been seeing constant, rapid improvement, the "user experience" of the Windows command line was in vast need of an upgrade, when compared to its macOS and GNU/Linux counterparts.
As we're getting started, it's useful to understand the difference between a terminal and a shell. A terminal is essentially "what you see" when using the command line—it renders the text, draws any user interface (UI) widgets, and accepts keyboard and mouse input. The terminal will then send this input to the shell for processing. The old terminal on Windows was called conhost.exe and was the only built-in terminal; however, there were and still are alternative third-party terminals such as ConEmu and Hyper.
A shell doesn't have a UI; it's a command-line program that receives input from the terminal, evaluates that input, and returns the result. Shells, such as the command prompt, PowerShell, and those running in WSL, require a terminal to collect input and display output. Launching the cmd.exe or powershell.exe shells from the Start menu or Run dialog will implicitly start the conhost.exe terminal, which can make the distinction less obvious for end users:
Figure 1.1 – PowerShell, running in both the old conhost on the left, and the new Windows Terminal on the right
Figure 1.1 – PowerShell, running in both the old conhost on the left, and the new Windows Terminal on the right
This delineation between terminals and shells means that switching to the new Windows Terminal is painless—the shells, such as the command prompt and PowerShell, are not changing. All existing knowledge and documentation of the command prompt, PowerShell, and shells under WSL can be reused, but commands will be sent through the new, more powerful Windows Terminal instead of the older, more barebones conhost.exe. Let's see what makes this new Windows Terminal so much better!
Note
A more in-depth discussion about the differences between shells and terminals can be found on Scott Hanselman's blog at https://www.hanselman.com/blog/whats-the-difference-between-a-console-a-terminal-and-a-shell.

The modern foundations of Windows Terminal

Earlier, we learned that Windows Terminal is built from the ground up to provide a more modern and flexible command-line experience. This command-line experience has three main parts: a modern UI, a flexible JSON-based customization system, and its open source development.

A Modern UI

When working with the command line, it's common to have a couple of command lines open. Perhaps a couple of operations need to be monitored at the same time, or some commands need to execute in PowerShell, and others need to use WSL. In the old terminal, the only option is to open separate windows and then Alt + Tab between them.
The new Windows Terminal comes with multiple options for managing these tasks. It features built-in tab support, each tab with its own shell, and all ...

Table des matiĂšres

  1. Windows Terminal Tips, Tricks, and Productivity Hacks
  2. Foreword
  3. Preface
  4. Section 1: Introducing the New Windows Terminal
  5. Chapter 1: Getting started with the new Windows Terminal
  6. Chapter 2: Learning the Windows Terminal UI
  7. Chapter 3: Configuring an Ubuntu Linux profile
  8. Section 2: Configuring your Windows Terminal and its shells
  9. Chapter 4: Customizing your Windows Terminal settings
  10. Chapter 5: Changing your Windows Terminal appearance
  11. Chapter 6: Setting up keyboard shortcuts
  12. Chapter 7: Hidden Windows Terminal Actions
  13. Chapter 8: Tips for using PowerShell like a Pro
  14. Chapter 9: Tips for Using Ubuntu like an Expert
  15. Section 3: Using your Windows Terminal for development
  16. Chapter 10: Using Git and GitHub with Windows Terminal
  17. Chapter 11: Building web applications with React
  18. Chapter 12: Building REST APIs with C# and Windows Terminal
  19. Chapter 13: Connecting to remote systems
  20. Chapter 14: Managing systems in the cloud
  21. Appendix Windows Terminal Actions
  22. Other Books You May Enjoy
Normes de citation pour Windows Terminal Tips, Tricks, and Productivity Hacks

APA 6 Citation

Fuqua, W. (2021). Windows Terminal Tips, Tricks, and Productivity Hacks (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/2585426/windows-terminal-tips-tricks-and-productivity-hacks-optimize-your-commandline-usage-and-development-processes-with-prolevel-techniques-pdf (Original work published 2021)

Chicago Citation

Fuqua, Will. (2021) 2021. Windows Terminal Tips, Tricks, and Productivity Hacks. 1st ed. Packt Publishing. https://www.perlego.com/book/2585426/windows-terminal-tips-tricks-and-productivity-hacks-optimize-your-commandline-usage-and-development-processes-with-prolevel-techniques-pdf.

Harvard Citation

Fuqua, W. (2021) Windows Terminal Tips, Tricks, and Productivity Hacks. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/2585426/windows-terminal-tips-tricks-and-productivity-hacks-optimize-your-commandline-usage-and-development-processes-with-prolevel-techniques-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Fuqua, Will. Windows Terminal Tips, Tricks, and Productivity Hacks. 1st ed. Packt Publishing, 2021. Web. 15 Oct. 2022.