Scoutman
Office Apps and Services MVP,
Enterprise Architect 🟡🟡🟡
thoughts on Architecture, Automation, Development and Technical Leadership
M365 Azure SPfx PowerShell DevOps keep it simple. keep it honest. keep it real.

⚜️ Episode II of V - Revolutionize your tech workflow with a single command

onecommand

This is the second of a five-part journey : the first episode, was around awareness of the crucial baselines to get started to drive technical projects\teams.

In this next one we will dive into what is now become indispensable for many in the tech community: its opening up new possibilities, blurring the lines between different computing environments, and providing a seamless bridge between what was once a very distinct and separate world.

Step into …


The single command that will change the way you drive your technical stuff …





Yes, WSL !

If you already know what it is, you know how much it can change the way you work. If you don’t… you should read on.



Windows Subsystem for Linux (WSL)

is a Windows feature that allows running a Linux environment on a Windows machine without the need for a separate virtual machine or dual booting.It is designed for having both Windows and Linux systems, simultaneously. With WSL, we can install various Linux distributions like Ubuntu, Debian, Kali, and more, run command-line tools, BASH scripts, and GNU/Linux applications.

WSL 2 ( most recent version) uses virtualization technology to run a Linux kernel inside a lightweight utility VM, with awesome performance.


Why the heck should I care about WSL ?

As a developer, IT professionals, or DevOps practitioners, there are several reasons why WSL is beneficial for our workflows since it offers a lot of benefits in terms of file system, compile tools, and usage speed, especially when compared to native Windows environments.

It provides seamless integration between Windows and Linux environments, making it easier to work with both systems efficiently with a lightweight alternative to traditional virtual machines. By allowing you to leverage Linux tools and applications directly on Windows it automatically enhances your productivity sky-high!

Here are some reasons why we must consider using WSL within our development or IT workflows :

📂 File System Performance

One of the significant advantages of WSL is its integration of a Linux file system on top of the Windows file system.

This allows for better file I/O performance, as Linux file systems are generally optimized for the kind of workloads encountered in development and server environments.

Linux file systems tend to handle a large number of small files and symbolic links more efficiently, which is beneficial for projects with many dependencies or intricate directory structures. Doing a lot of file I/O operations, such as reading and writing files, is faster in WSL compared to native Windows.

Are you developing a Node-based solution? You will notice a significant improvement in the time it takes to build and bundle your solution.

🛠️ Compile Tools and Usage Speed

WSL provides a native Linux environment, allowing us to use Linux-based compile tools directly on our Windows machine.

This leads to faster compilation times compared to running these tools in a native Windows environment. The Linux environment in WSL is lightweight and performs well, enabling a smoother development experience, particularly for projects that leverage Linux-centric toolchains.

🧊 Node.js and Frontend Development

WSL allows us to run Node.js and other frontend development tools natively in a Linux environment.

This can help avoid compatibility issues and streamline development workflow. Frontend development often involves using command-line tools and building systems that are more native to Linux. WSL facilitates the seamless integration and execution of these tools.

🦔 SharePoint Development

SharePoint development often involves a mix of technologies, including .NET and various scripting languages.

With WSL, we can leverage the strengths of both Windows and Linux environments, ensuring compatibility and ease of use for a broader range of tools and frameworks.

🐍 Python Development

WSL provides a convenient environment for Python development, offering compatibility with Linux-specific Python libraries and tools.

With the ability to seamlessly switch between Windows and Linux environments, we can choose the best-suited tools for our Python development tasks.

📃PowerShell and CLI Tools

WSL does not replace PowerShell; instead, it complements it.
We can still use PowerShell for Windows-centric tasks, and with WSL, we now have the flexibility to use Linux command-line tools for tasks where they are more suited.

This dual-environment capability is valuable for IT professionals and DevOps practitioners who often work with a diverse set of tools and technologies.

♾️ DevOps and Automation

WSL is well-suited for DevOps and automation tasks, providing a consistent environment for running scripts and tools across different platforms. Whether we are working with configuration management tools, containerization, or CI/CD pipelines, WSL can help streamline our DevOps workflows.

☁️ Cloud Development

WSL is well-suited for cloud development, providing a consistent environment for working with cloud platforms and services. Whether we are developing cloud-native applications, managing cloud infrastructure, or working with cloud-based tools, WSL can help ensure a seamless development experience.

🏫 Machine Learning and Data Science

WSL provides a convenient environment for machine learning and data science tasks, offering compatibility with Linux-specific libraries and tools. With WSL, we can leverage the strengths of both Windows and Linux environments, ensuring compatibility and ease of use for a broader range of machine learning and data science tools.

As an overview, WSL offers a wide range of benefits for developers, IT professionals, and DevOps practitioners, providing a seamless and efficient way to work with Linux-based tools and technologies on Windows.

Whether we are developing applications, managing infrastructure, or working with cloud platforms, WSL can help streamline the workflows and ensure a consistent and productive development experience.


Quite a list no...?

Real case usage

WSL it is a game-changer, and I’m not the only one who thinks so.

Here are some first-hand real-world examples of how WSL is being used to streamline workflows in different industries.

I am not promoting the WSL product with the expectation of receiving any personal gain or benefit, just sharing the feedback from the field
( … and for obvious reasons, I’m hiding the names of the companies\clients\partners)

Financial

a company that provides a trading platform for financial markets, uses WSL to streamline their development workflows.

“ Working on a huge project that consists of multiple smaller services that has to run on both Linux and Windows. We now can launch everything from one machine and one command line interface. We have services hosted on WSL under docker and all native apps connect to it from either Windows, Linux , Android or IOS using just a single machine. We have donet, java, and Python stacks and all work like a charm. Rock on Microsoft to allow us to do this! ”

Insurance

A company that provides insurance services, uses WSL to streamline their operational workflows.

“ My company underestimated the advantage of having Linux and Windows environments coexisting on the same machine.

Full machine virtualization (HyperV, VMware) was too heavy on costs and operational side for a lot of IT tasks.

Now we get the same machine, same host, with no extra cost ”

😉

Services

A scientific institute, uses WSL to streamline their scientific computing workflows.

“ We are using WSL to run our machine learning models and data science workloads. We can now use the same environment for both development and production, and it's a huge time saver. ”🚀

Research

uses WSL to streamline its machine learning workflows.

“ We do a lot of scientific computing, where the code is intended to run on massive supercomputers running in Linux, so now it's extremely helpful to have a Linux coding environment.

But we don't like using Linux as our daily operating system,

WSL lets us get the best of both worlds.”

Challenge by Frontend Mentor
Coded by Rahul Sah.

My own reasons to use WSL are to have a consistent environment across different projects and tasks: consistency, speed, and flexibility. I’m using the same environment for Python, Node.js, .NET, and PowerShell development, and I can also use it for automation tasks and DevOps workflows. The speed of it is …overwhelming!

I’m always working on SharePoint Framework projects, and if we use Windows … Node projects in Windows are slow, and I mean, really slow to do anything, but with WSL, it’s like a rocket. Try to run a npm install in a big project (Windows vs Linux), and you will see the difference.

Also with the emerging AI and Machine Learning projects, Python is a must, and if you’re doing any development in that field, you will notice a significant improvement in the time it takes to build and bundle the solution, plus any time I try to install Python update in Windows, it’s usually a configuration nightmare and it’s always a pain to get it working, but with WSL, it’s just a breeze.

Plus, I can package my WSL instance and share it with the teams, and we all have the same environment, no matter the OS we are using or restrictions we have imposed on our machines.

Rapid, clean, and with no hassle.

Getting Started with WSL

If you are new to WSL, here are some basic steps to get started:

  • Install WSL
    Follow the official documentation to install Windows Subsystem for Linux from here and here on your Windows machine.

  • Choose a Linux Distribution
    Select and install a Linux distribution from the Microsoft Store, such as Ubuntu, Debian, or Fedora.

  • Initialize and Configure
    Complete the initial setup and configuration steps for your chosen Linux distribution.

  • Launching WSL
    Open the Start menu, type the name of your chosen Linux distribution, and launch the WSL terminal.

  • Updating Packages
    Keep your Linux distribution up-to-date by running sudo apt update && sudo apt upgrade (for Debian/Ubuntu) or the equivalent command for your distribution.

  • Navigating Directories
    Use familiar Linux commands like cd, ls, and pwd to navigate and explore directories.

  • File Manipulation
    Copy, move, and delete files using commands like cp, mv, and rm.

  • Installing Software
    Install additional software with package managers like apt, yum, or dnf.

  • Text Editing
    Edit text files using command-line editors like nano or vim.

  • Exiting WSL
    Exit the WSL terminal using the exit command.


WSL is great, although setting up WSL on our machine can be daunting for some, and it’s not always a smooth ride.

Nevertheless hope it helps, and if you are already using it, it’s the way to go.

Stay tuned, and get ready for the next episode Episode III of V - … where one of the products will be revealed!


Marginal Gags (small hand-made cartoons) credits : awesome Sergio Aragonez ! creator of Groo, the Wanderer


See also

Rodrigo Pinto