Windows Subsystem for Linux 2 (WSL 2) Tips, Tricks, and Techniques: Maximise productivity of your Windows 10 development machine with custom workflows and configurations
1800562446, 9781800562448
A practical handbook that will help you bridge the gap between Windows and Linux to develop apps that leverage the best
Table of contents : Cover Title Page Copyright and Credits Dedication About Packt Contributors Preface Section 1: Introduction, Installation, and Configuration Chapter 1: Introduction to the Windows Subsystem for Linux What is WSL? Exploring the differences between WSL 1 and 2 Overview of WSL 1 Overview of WSL 2 Summary Chapter 2: Installing and Configuring the Windows Subsystem for Linux Enabling WSL Checking for the required Windows version Checking for the easy install option Enabling the required Windows features Installing the Linux Kernel Installing Linux distros in WSL Configuring and controlling WSL Introducing the wsl command Introducing wsl.conf and .wslconfig Summary Chapter 3: Getting Started with Windows Terminal Introducing Windows Terminal Installing Windows Terminal Using Windows Terminal Learning handy keyboard shortcuts Configuring Windows Terminal Customizing profiles Changing the appearance of Windows Terminal Summary Section 2:Windows and Linux – A Winning Combination Chapter 4: Windows to Linux Interoperability Accessing Linux files from Windows Running Linux applications from Windows Piping into Linux Piping from Linux Accessing Linux web applications from Windows Summary Chapter 5: Linux to Windows Interoperability Accessing Windows files from Linux Calling Windows apps from Linux Calling Windows scripts from Linux Passing data between PowerShell and Bash Interoperability tips and tricks Creating aliases for Windows applications Copying output to the Windows clipboard Using symlinks to make Windows paths easier to access Using wslview to launch default Windows applications Mapping paths between Windows and WSL SSH agent forwarding Summary Chapter 6: Getting More from Windows Terminal Customizing tab titles Setting tab titles from the context menu Setting tab titles from your shell using functions Setting tab titles from the command line Working with multiple panes Creating panes interactively Managing panes Creating panes from the command line Adding custom profiles Summary Chapter 7: Working with Containers in WSL Overview of containers Installing and using Docker with WSL Running a container with Docker Building and running a web application in Docker Introducing Dockerfiles Building the image Running the image Rebuilding the image with changes Introducing orchestrators Setting up Kubernetes in WSL Running a web application in Kubernetes Creating a deployment Summary Chapter 8: Working with WSL Distros Exporting and importing a WSL distro Preparing for exporting Performing the export Performing the import Creating and running a custom distro Finding and pulling the container image Configuring a container ready for WSL Converting the container to a WSL distro Running the new distro Taking it a step further Summary Section 3: Developing with the Windows Subsystem for Linux Chapter 9: Visual Studio Code and WSL Introducing Visual Studio Code Introducing Visual Studio Code Remote Getting started with Remote-WSL Opening a folder with Remote-WSL Running the app Debugging our app Tips for working with Remote - WSL Loading Visual Studio Code from your terminal Opening an external terminal in Windows Terminal Using Visual Studio Code as your Git editor Viewing Git history Summary Chapter 10: Visual Studio Code and Containers Introducing Visual Studio Code Remote-Containers Installing Remote-Containers Creating a dev container Adding and opening a dev container definition Working in the dev container Running the code Working with a containerized app in dev containers Setting up Docker in the dev container Building the application Docker image Running the application container Working with Kubernetes in dev containers Options for Kubernetes with dev containers Setting up kind in a dev container Running our app in a Kubernetes cluster with kind Tips for working with dev containers postCreateCommand and automating pip install Port forwarding Mounting volumes and Bash history Using pinned versions for tools Always Installed Extensions and dotfiles Summary Chapter 11: Productivity Tips with Command-Line Tools Working with Git Bash completion with Git Authentication with Git Viewing Git history Git information in the bash prompt Working with JSON Using jq Using PowerShell to work with JSON Summarizing working with JSON Working with the Azure CLI (az) Installing and configuring the Azure CLI Creating an Azure web app Querying single values Querying and filtering multiple values Working with the Kubernetes CLI (kubectl) Installing and configuring kubectl Creating a Kubernetes cluster Deploying a basic website Querying with JSONPath Scaling the website Querying with jq Summary Other Books You May Enjoy Index