Settings

Theme

Ask HN: Are there no shells for Windows other than PowerShell and CMD?

11 points by piuvas 3 years ago · 22 comments · 1 min read


And I don't mean terminal emulators, because I know Console Host, WT, Kitty, Alacritty. I mean shells like bash, zsh.

How come there are so many alternatives for linux but none for Windows?

Nothing against PowerShell, I'm just curious.

delta_p_delta_x 3 years ago

Why not PowerShell, though? If you ever want to directly administer Windows through the command-line, PowerShell is increasingly your only bet, as older CMD executables are deprecated.

I'll suffix with my opinion that PowerShell is much nicer than many POSIX shells, especially given its hybrid object-oriented + functional pipeline paradigm.

  • pixl97 3 years ago

    And following on this, for the longest time Windows only had extremely limited ability to manage itself via the command line and things were very haphazard on how you could manage them on the CLI. You were probably just using the CLI to edit the registry and restart serivces/executables at the best case.

    This is really the reason there are no shells for windows. There wasn't anything for the shell to do! No massive collection of small executables linux *nix that were shell oriented. No system design around CLI management.

    Around Windows 2016 or so I would say this changed with Powershell and with a number of design changes by Microsoft that allowed much better remote management (and not fully depending on GPO to do it), and I even run into some customers that have headless windows servers these days.

cloudking 3 years ago

You can get Linux shells and environments in Windows via WSL https://learn.microsoft.com/en-us/windows/wsl/install

  • pixl97 3 years ago

    Yep, WSL is the way to go, specifically WSL2 if you want more IO performance.

    Very convenient on my work laptop where I can't replace the OS.

    • naikrovek 3 years ago

      bash, zsh, ksh, etc., those aren't shells for Windows, though, are they?

      • pixl97 3 years ago

        The distinction is kind of meaningless. If you want an extensible shell in windows you're either using powershell (which I have come to quite like) or you can use any of the Linux shells that exist via WSL. Native shells just were not a thing for the longest time as the type of user that wanted that tended to go to Linux.

      • cloudking 3 years ago

        WSL makes it possible, you can interact with the Linux and Windows filesystems interchangeably

andrewf 3 years ago

There's 4DOS descendent Take Command: https://jpsoft.com/

  • BiggsHoson 3 years ago

    +1 for Take Command. I've used it since its mid-90s iteration, and still use it nearly every day. It has a great mix of command prompt features and batch file language enhancements.

anigbrowl 3 years ago

Way back when there were a few substitutes for command.com, but none of them offered sufficiently utility to gain traction outside of the IT department. And since it's now trivially easy to run a unix virtual machine and do your command line stuff there if you want, I'm not sure there's much inventive to develop alternatives.

runjake 3 years ago

There's plenty. Do more research.

- WSL -> Bash (Best, IMHO)

- Cygwin (old, slow IMHO)

- Git Bash (essentially includes bash for windows with a bunch of the more popular add-ons.

But, PowerShell is a pretty great shell, too. Make sure you're running the latest 7.x version, as it's improved tons.

metadat 3 years ago

What classification does Cygwin fall under?

It can run most or all of the widespread *nix shells.

HiramKHurley 3 years ago

There's Yori http://www.malsmith.net/yori/

Kukumber 3 years ago

I personally don't count powershell as a shell, it's more like an interpreted/jit compiled .net interactive CLI 'shell', hence why it is slow to start and to run

A shell is a program that takes your commands and send them to the OS, it doesn't compile anything

  • naikrovek 3 years ago

    a shell is what you type your commands into. a shell interprets those commands, pipes between them, and to and from file handles, and acts as the interface between the human and the things they want to do.

    bash is FAR slower than PowerShell, and it's interpreted.

    • Kukumber 3 years ago

      > bash is FAR slower than PowerShell, and it's interpreted.

      That's not true at all

      I have a demonstration that's very telling:

          time pwsh
      
          time bash
      
      Post your result

      It's sad that nowadays people do not understand the purpose of a shell

      • pixl97 3 years ago

        This really sounds like shell gatekeeping touching on the no true Scotsman fallacy.

        The purpose of the shell, to me, is to

        1. Remote management/system administration. 2. Application execution 3. Data modification in situ

        And powershell does all 3 for me.

        Lastly just typing bash/pwsh is a useless benchmark as I can make both run at wildly different speeds (bash .profile modification and pwsh -noprofile loading)

        • Kukumber 3 years ago

          I never said you should not use it, i'm not gatekeeping

          I only state a fact, you pick what you want that empowers you to do great things

          But i'm not going to ignore wrong claims, it lowers the standard of quality we should expect from the tools we create, share and use

spacechild1 3 years ago

I always use the Msys2 shell.

melony 3 years ago

https://www.atlassian.com/git/tutorials/git-bash

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection