It's been really frustrating sometimes when following along in tutorials that make use of the terminal, that Command Prompt doesn't support a lot of default Linux/UNIX/MacOS supported commands like grep, etc. Just yesterday, I realized that I have another terminal available: Git Bash! So far, it seems like I can do anything I could on Command Prompt plus a lot of Linux commands. What's your terminal of choice on Windows? Why? Is there any reason not to use Git Bash?
I actually like the command shell just because it has the lowest memory footprint, loads faster, responds faster, and isn't as AGONIZINGLY AND POINTLESSLY CRYPTIC as sh and everything based on sh (like BASH) is. The powershell is just painful to watch load... it shouldn't take longer to initialize a bloody shell than it does to launch a browser!
It's BAD when you make DOS look clear and verbose -- and I've been saying that for near on three and a half decades. If I wanted to dick around with cryptic abbreviated commands I'd drag out my Trash-80 model 12 and boot up Xenix!
Admittedly that's a LOT of my problem with *nix as a desktop OS be it Linux or FreeBSD. Too much crap that should be a simple GUI page with checkboxes that you HAVE to google long cryptic dumbass commands to even accomplish. I dealt with that crap 30 years ago, why would I still be doing that crap today when I don't have to?
... and really if you need a grep equivalent, that's what findstr is for. Short for "find string" ... aka WHAT IT DOES. Just like how "dir" is for directory (what the F* does "ls" even stand for?)
But again, there's a LOT of reasons that *nix, posixisms, and even the C language were RIDICULED by the microcomputer community in the '80's and would probably be long dead and buried if not for Linus Torvalds.
Though to be fair, I'm still not convinced this is a joke:
On a very similar topic, could you Windows user recommend/share a good introduction to the new Linux Subsystem for Windows? I read about it in a few headlines, but hadn't the time to dig more. Since our team is mostly Linux (well, almost all Debian, and a few Ubuntu, then a few Mac), we try to put some instructions for other OSes, but sometimes new people come in and want to run/setup some stuff on Windows, and we which everybody could use the same shell! Years ago I used Cygwin on Windows, then Git Bash, but the easiest and closest solution (i.e. the simplest stuff we could give to a sales engineer) would be great, which is why I'm really curious to learn more about the new Linux Subsystem, if anyone has some tips or articles to share, that would be really appreciated!
It's important to understand that CMD and Powershell are not bash shells and are not really trying to provide the same features. They were designed for a very different ecosystem. So they are an apples-to-oranges comparison to bash shells.
If you are on Windows 10 there is no question that WSL is the best option - being a full linux shell with deep Windows integration; rather than an emulation (Cygwin, Git Bash, etc) or a full virtual machine (which works but is slow).
If you are stuck on older Windows, you may find Cygwin works for git and bash; while cmd/Powershell are good for running node/npm/yarn commands (and I do mean just those commands, where the windows support is pretty good). There should be a "Nodejs command prompt" on your machine which is tailored for node, which works pretty well. I find I end up adding a .bat file to shim ls to dir though ;) Force of habit.
I've found that nodejs and Cygwin don't get along. Cygwin may also be slow on some systems, not sure why as some are just fine and others lag badly on i/o operations.
I don't recommend Git Bash as it's really just designed to provide git, not to be a full bash environment. There are some quirky little issues with it that make it unpredictable. That said, same goes for Cygwin.
PowerShell is not as prolific as Bash, but it is leaps and bounds better than Bash. And PowerShell is available on every platform now (github.com/PowerShell/PowerShell).
If I'm restricted to a Posix shell, then I will choose zsh.
Powershell is far more powerful on Windows than any of those, and it actually is very intuitive as well... It does take some learning and getting used to, but I'm willing to bet if you are strictly working with Windows, you won't find a better shell than Powershell as long as you are willing to thoroughly learn it.
Also, if you want to do Linuxy stuff, you can just install Windows Subsystem For Linux and then install Ubuntu or Fedora or something from Microsoft Store... Now you can do most Linux things from a native shell in Windows rather than having to just use the Git Bash one.
To be honest I'm just too lazy to learn another shell.
I know Bash. It's a mess, but not as bad as cmd. So I use Git Bash.
I've briefly looked into new cross-platform shells like Elvish. It looks much better, but in the end, I do shell stuff only because I need to, I'd rather learn something like Haskell than another shell.
For 'shell' scripts that aren't extremely short I usually use Python.
Nicolás Parada
Web Developer
PowerShell Core with git. You know, when you install git, it allows you to add the Linux tools.