Shell comparisons
The syntax-level, semantic, and ergonomic differences between two shells in one page — plus a side-by-side command table for every common operation.
- Bash vs cmd.exe
Linux's default scripting shell vs Windows' legacy text shell — the foundational layer of the WSL porting conversation.
- Bash vs Fish
Fish is everything bash isn't friendly to do — at the cost of bash script compatibility.
- Bash vs PowerShell
The headline difference: bash pipes bytes of text, PowerShell pipes typed .NET objects.
- Bash vs Zsh
Zsh is "bash with the rough edges sanded off" — almost script-compatible, much nicer interactively.
- cmd.exe vs Fish
Two shells that share less than any other pair on shellmap: a 1993 Windows text-only batch host vs a modern non-POSIX Unix prompt-first shell.
- dash vs Bash
Why your `#!/bin/sh` script breaks on Debian and Ubuntu. dash is the strict POSIX shell that lives at `/bin/sh` on most Linux distros — fast, small, and unforgiving toward bash extensions.
- dash vs sh (POSIX)
A bait-and-switch comparison: `dash` IS an implementation of `sh`. The interesting question is "which sh am I actually running?" — Debian/Ubuntu = dash, Alpine = busybox ash, macOS / RHEL / Fedora = bash --posix, AIX / OpenBSD = ksh. Each is POSIX-conformant on paper; each has its own non-POSIX extras and refusals.
- Fish vs PowerShell
Two opposite design philosophies: fish optimizes the interactive prompt; PowerShell optimizes typed-object scripting.
- PowerShell vs cmd.exe
Both ship on Windows, but they're not the same tool — one pipes objects, one pipes text, and the syntax has nothing in common.
- sh (POSIX) vs Bash
`sh` is POSIX — the portable minimum. Bash is sh + 20 years of GNU extensions. Knowing the difference is the difference between "works on Alpine" and "needs a Dockerfile rewrite".
- sh (POSIX) vs cmd.exe
You are porting a `/bin/sh` install script — `set -e`, `$(curl …)`, `for f in *; do …; done` — to a `.bat` / `.cmd` installer you can double-click on Windows. The two are both "text-mode shells", and that's where the similarity ends: variable syntax, conditionals, loops, command substitution, arithmetic, line endings, escape characters, and exit-code conventions all change.
- sh (POSIX) vs Fish
Fish is the only mainstream Unix shell that deliberately *rejects* POSIX. Every other comparison on this site is "POSIX plus extensions" — sh-vs-fish is "POSIX vs a parallel-universe syntax". This is the compare you need before you `chsh -s /usr/bin/fish`.
- sh (POSIX) vs PowerShell
A POSIX shell script and a PowerShell script are not two dialects of one language — they are two languages. `sh` pipes bytes; PowerShell pipes typed .NET objects. This is the compare you need before porting a `/bin/sh` install script to a Windows installer, or asking "why does my Linux one-liner do nothing in pwsh?".
- sh (POSIX) vs Zsh
macOS has shipped Zsh as `/bin/zsh` since Catalina (2019) but its `/bin/sh` is still strict POSIX. This compare is the bridge: which zsh features survive a switch back to `sh`, and what the macOS-trained developer trips over in CI.
- Zsh vs cmd.exe
Default macOS shell vs default Windows batch shell — the porting context when distributing Mac-authored scripts to Windows users.
- Zsh vs Fish
Both ditched bash defaults — zsh stayed POSIX-ish, fish broke the syntax to make it friendlier.
- Zsh vs PowerShell
Default macOS shell vs default Windows shell — the most common cross-laptop porting comparison.