Industry Insights 5 Setup your Linux development environment in Windows Using WSL, VS Code and OhMyPosh

Industry Insights

sonatafy-glyph

Setup your Linux development environment in Windows Using WSL, VS Code and OhMyPosh

by | Apr 5, 2024 | All, Programming, Software Development

About The Author Alejandro Ramírez

Alejandro Ramirez is a Director of Engineering with over 20 years of experience in Software Development, across a diverse range of industries and applications.

Developing on Windows 11 has become significantly more flexible and powerful with the integration of the Windows Subsystem for Linux (WSL) and the customization capabilities of OhMyPosh in the Windows Terminal. This synergy not only enhances productivity but also brings a level of comfort and efficiency previously enjoyed mainly in Unix-like environments. In this article, we explore the benefits of each tool and outline the main processes involved in setting them up without diving into the specifics of installation steps. For detailed setup instructions, refer to each project’s official website.

Windows Subsystem for Linux (WSL)

Windows Subsystem for Linux (WSL)

WSL is a revolutionary feature that allows Windows users to run a Linux distribution alongside their existing Windows installation, without the overhead of traditional virtualization. It’s an invaluable tool for developers, especially those working in cross-platform projects or requiring tools and scripts native to Linux.

Benefits of Windows Subsystem for Linux (WSL):

  • Seamless Integration: Run Linux applications on Windows seamlessly without needing a full Linux kernel or dealing with dual boot setups.
  • Development Consistency: Ensure consistency between development and production environments if your deployment target is a Linux server.
  • Access to Linux Tools: Utilize a vast array of Linux-specific development tools and languages natively on Windows.
  • Performance: Enjoy near-native performance without the resource overhead typical of virtual machines

Visit the official WSL setup guide at: WSL Installation Guide

visual studio code

Visual Studio Code (VS Code) and WSL

VS Code is a popular, lightweight code editor that supports development in multiple languages and frameworks. When combined with WSL, developers can write, build, and test their code entirely within a Linux environment, leveraging VS Code’s powerful editing and debugging features.

Benefits of Using VS Code with WSL:

  • Cross-Platform Development: Develop on Windows, but run and test your code in Linux.
  • Integrated Terminal: Access a Linux terminal directly in VS Code, making it easy to run Linux commands and tools.
  • Remote Development: Use VS Code’s Remote – WSL extension to interact with your Linux file system, manage packages, and execute scripts.

For more information on setting up VS Code with WSL, check out: Developing in WSL with Visual Studio Code

visual studio code

OhMyPosh in Windows Terminal

OhMyPosh is a prompt theme engine for Windows Terminal that allows for extensive customization, bringing a rich, visually appealing interface to the command line. It supports numerous themes and enables developers to tailor their terminal’s appearance and functionality to suit their preferences.

Benefits of OhMyPosh:

  • Customizability: Highly customizable prompts, including Git status, execution time, and more.
  • Visual Appeal: Enhance the visual appeal of the terminal with themes and custom icons.
  • Productivity: Improved command line experience can lead to increased productivity and ease of use.

For setting up OhMyPosh in Windows Terminal, visit the official guide at: OhMyPosh Setup

In Conclusion…

Combining WSL for a robust development environment, VS Code for its powerful editing capabilities, and OhMyPosh for terminal customization creates a highly efficient and enjoyable development setup on Windows 11. While this guide outlines the benefits and provides a roadmap to getting started, detailed instructions and more information can be found on each project’s official website. Embrace these tools to transform your Windows development experience into one that rivals traditional Linux setups in performance, usability, and aesthetics.