On Windows, when I want a command line, I can choose between the native PowerShell or install the Windows Subsystem for Linux. I prefer the latter when I’m on Windows. Here’s why I reach for a Linux shell instead of PowerShell.

I’m More Familiar With Linux

One reason that I’ve stuck with WSL on Windows, to the point that Iinstall iton every new Windows machine I get, instead of PowerShell is that I find the whole Linux and Unix-like paradigm more familiar. I did use MS-DOS back in the ’90s and would fire up an occasional Command Prompt on earlier versions of Windows, but in terms of the command line, it was Unix that captured my imagination, with all of its weird ls, pwd, and cd commands.

This journey started, oddly enough, on the Mac, which was and is the premier platform for creating media back when I was earning my communication degree. One day, I decided to explore the macOS, or rather, Mac OS X, terminal. This is where I learned tonavigate the directory treeand create files in Vim. I seem to be one of the few people who knows how toactually get out of Vim. Or at least I would if I wanted to.

WSL Vim, directory, and htop running in separate terminal windows on Windows 11.

Armed with the knowledge of Unix, I soon pulled out my Knoppix CD and fired it up, since I could finally get it to connect to the internet now that it was plugged into the Airport router (Yes, Apple used to make routers, practically introducing Wi-Fi back around the Turn of the Millennium). This led me down the road to exploring Linux distros, which eventually led to me writing for HTG.

My knowledge of Linux and Unix feels too valuable to waste on learning something quite different from other command-line shells.

Error message attempting to run a Linux pipeline in PowerShell.

PowerShell Feels Weird

I’ve never been able to fully grasp PowerShell. It seems to try to be radically different from the traditional Unix and Linux paradigm. In Linux, you operate on pure text. Text input and output can be redirected into other programs and files. This is what gives the Unix style of programming its power and is a key part of the “Unix philosophy.”

PowerShell, by contrast, is built to be “object-oriented.” When you write a pipeline in PowerShell, you work on an object instead of a text stream.

Stack Overflow developer survey chart showing OS preference.

The command-line syntax has always seemed a bit too verbose for my taste as well. I do appreciate how Microsoft has"aliased"certain common commands into shorter MS-DOS and Unix commands. It seems that Microsoft might have realized that this may have been an issue as well.

Linux Has More Developer Mindshare

Linux, or rather Unix, has not only captured my imagination, but the rest of the developer community. Pick up any programming book, and it will likely assume you’re using a Unix-like environment. This will be either a Linux or macOS installation. Read through articles on Hacker News. Command-line code snippets will often start with a “$” (dollar sign), indicating the default user prompt for most Unix-like shells, if it isn’t a “#” (hash) character, indicating that a command is meant to be run as superuser. Unix-like systems, including macOS, Ubuntu, and other Linux systems,are highly desired on Stack Overflow’s developer survey.

Glance at a developer’s laptop, and they’ll be running either a macOS terminal or some kind of Linux shell. This is the reason that Microsoft created WSL in the first place: the Unix paradigm is pervasive among programmers. This is what developers learn in their computer science classes in college. This is what they build their projects in during their spare time. A generation of developers has cut their teeth on open-source tools running on Linux and has no interest in coding on .NET tools.

Listing of Windows C drive from Ubuntu WSL installation.

When developers create a project in the real world, what are they going to build it on, Linux or PowerShell? It’s obvious that it’s going to be the former. This is why, even on Windows, I’ll devote more of my energy to learning more on the WSL side of the fence.

If I want to follow along with a book or tutorial to learn a new programming language or tool, I can feel confident that if I wanted to do so on Windows, I could fire up a WSL terminal and follow along. I’m not sure if I could from a PowerShell terminal.

Linux Seems More Portable

While Microsoft stresses that PowerShell is a multiplatform program, open-sourcing it andmaking it available on Linux, it’s not clear why anyone would want to use PowerShell on a Linux system.

Linux shells have the advantage of being installed on Linux distributions already. With PowerShell, you have to install it separately from the system. If a Linux distribution ever packaged it as a default shell, I would happily test and review it for a future article.

Even on Windows, which seems to favor PowerShell, I can obtain a Linux shell. This has been true for years before WSL became available. Cygwin, MinGW, and UWIN were able to offer Unix-like capabilities on Windows. There hasn’t been much of an effort to port Command Prompt to Linux.

With my knowledge of the Linux command-line, I can sit down at a Linux system, a Mac, and of course, a Windows system running WSL and be able to run commands off the top of my head and even run scripts without having to change them. I can’t say the same for the other way around.

Most Command-line Programs Are Linux-First

As a consequence of the large amount of mindshare that Linux holds over developer mindshare, it seems that new command-line tools are written for Unix-like systems first, particularly Linux. This isn’t surprising given how many servers run Linux.

New servers, interpreters, debuggers, editors, and IRC clients are still being written for Linux. They seem to make their way more slowly to Windows on PowerShell. When they do reach Windows, it’s usually through WSL. There is likely a technical reason for this. For many years, Windows lacked a true pseudoconsole, which made porting many popular terminal-based applications to Windows difficult. It was the WSL project that was the impetus for finally creating this vital piece of software on Linux, according toa Microsoft blog post.

I use WSL because I can accessthe tools I rely oneasily.

Microsoft positions PowerShell primarily as a tool forIT administrators to manage desktops and serversand less as a way to run actual programs in the terminal, though they’ve made strides by adding tools such as OpenSSH to the default Windows installation.

I Can Manage Windows From Linux

While Microsoft claims PowerShell as the way to manage Windows from the command line, going as far as to replace the old Command Prompt with it,I can do a lot of things that I might use PowerShell for from a WSL installation.

WSL installations make the Windows system accessible from Linux from the /mnt directory. This means that for my main Windows installation on the C:\ drive, I can run all of my favorite tools from Linux on Windows directories and files. There’s less of a reason to deal with PowerShell’s eccentricities. I can also launch regular Windows programs from the Linux command line.

I can do this with all my favorite tools and Linux programs that I’ve gotten to know on other systems, while still running mainstream apps like games from Windows. Sure, there are more games on Linux, and Proton keeps improving, but there will still be a few straggler developers who can’t be bothered to type “make” from their terminals.

Since WSL is more familiar to me as a long-time user of Unix-like systems, I’ll stick with it over PowerShell when I’m on a Windows system. Maybe it’s just familiarity, but with Linux so ubiquitous in the tech world, I’ll likely be in good company.