Windows Subsystem for Linux (WSL) allows you to leverage the benefits of Linux package management and command-line tools to streamline your development workflow.
Some tools used during the development process are only available or are performed best on one platform and transferring data from one system to another to visualise or share can be tedious. WSL solves this problem with a feature called interoperability.
Interoperability is the ability to transparently execute commands and applications, share files, network and environment variables across Windows and Ubuntu.
We’ll illustrate all these notions by generating data from your Ubuntu WSL instance using your Windows user profile directory, perform some transformations via PowerShell scripts, and finally, visualise those on Windows. We are going to cross the chasm between the two worlds not just once, but many times, seamlessly!
In this tutorial, you will learn:
- How to access a service provided by a web server running on your Ubuntu WSL instance from Windows.
- Share environment variables between Windows and Ubuntu, back and forth.
- Access files across filesystems, and discover where they are located on both sides.
- Run Windows commands (command line and graphical) from your WSL instance and chain them.
What you will need:
- Know how to use command line tools on Windows or Linux.
- A PC with Windows 10 or 11.
- Optional: LibreOffice or MS Excel to visualise and manipulate generated data from Ubuntu.