Live data from Hacker News

Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

news.ycombinator.com

1–10 of 53 posts

Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#1
I know the Interop feature is coming to Bash for Windows (https://blogs.msdn.microsoft.com/commandline/2016/10/19/interop-between-windows-and-bash/) which to me seems to solve the complaints I had with the initial implementation.

Can anyone comment on their experiences using Bash for Windows for development full-time?

Thanks!

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#4
post #2

Why not a Virtual Machine on your PC?

For my use case I would prefer to have 100% of system resources on one OS. Also, I'm coming from a Mac and would prefer the "integrated" feel if that makes sense

The VM's are amazing.

You don't have to dual boot.

You can have on one screen Ubuntu, on the other, windows. So you can use all your photoshoppy design programs on windows and the best coding on linux.

Best of both worlds.

You can also intall cygwin in windows which gives you a terminal on windows. Although there may be be a better program now than cygwin

Also, not sure if this is any good: http://www.pcworld.com/article/3106463/windows/how-to-get-ba...

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#5
post #2

Why not a Virtual Machine on your PC?

For my use case I would prefer to have 100% of system resources on one OS. Also, I'm coming from a Mac and would prefer the "integrated" feel if that makes sense

You could make it the other way around. Install Linux and use KVM to have a windows virtual machine at almost 100% native speed and basically full access to the hardware.

The only difficulty is if the hardware doesn't fully support Linux without hassle (in very recent notebooks for instance).

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#6

Earlier quoted context omitted.

For my use case I would prefer to have 100% of system resources on one OS. Also, I'm coming from a Mac and would prefer the "integrated" feel if that makes sense

The VM's are amazing. You don't have to dual boot. You can have on one screen Ubuntu, on the other, windows. So you can use all your photoshoppy design programs on windows and the best coding on linux. Best of both worlds. You can also intall cygwin in windows which gives you a terminal on windows. Although there may be be a better program now than cygwin Also, not sure if this is any good: http://www.pcworld.com/art…

> You can also intall cygwin in windows which gives you a terminal on windows. Although there may be be a better program now than cygwin

Yes, like WSL, which OP is asking.

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#7
I have tried using it for the past couple of weeks, and had to fiddle a lot for the first week or so to get it working nicely. The package state is stuck at 14.04 but you can upgrade[0] to 16.04 with dirty[1] trick. After the initial setup, Windows Bash worked just fine for my Rust / Go / Python needs.

What would you mainly use the bash environment for ?

[0](http://www.omgubuntu.co.uk/2016/08/upgrade-bash-windows-10-u...) [1](https://github.com/Microsoft/BashOnWindows/issues/482#issuec...)

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#8
I have not tried Bash for Windows, but I've been a Cygwin user for almost a decade.

The main problem I have with using any kind of shell on Windows is that process spawning takes much, much longer than on *nix systems. I regularly find myself optimizing my scripts not for readability or elegance, but for total number of calls to executables.

To illustrate, opening a new Cygwin Bash shell on this machine takes 3 seconds, almost all of which is spent executing .bashrc. On Linux, with the same .bashrc (modulo a few platform-specific settings) that's under 0.2 seconds.

So, far from perfect, but is it 'good enough'? I'd say yes. Bash is just so much nicer than CMD, and while I hear good things about PowerShell, I can't be bothered to learn a different shell for every platform I use.

Whether there are additional tradeoffs with Bash for Windows, I cannot judge.

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#9

Earlier quoted context omitted.

The VM's are amazing. You don't have to dual boot. You can have on one screen Ubuntu, on the other, windows. So you can use all your photoshoppy design programs on windows and the best coding on linux. Best of both worlds. You can also intall cygwin in windows which gives you a terminal on windows. Although there may be be a better program now than cygwin Also, not sure if this is any good: http://www.pcworld.com/art…

> You can also intall cygwin in windows which gives you a terminal on windows. Although there may be be a better program now than cygwin Yes, like WSL, which OP is asking.

Nothing wrong with broadening an answer, no need to be black and white. Cygwin has been around for ages.

Re: Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

#10
There's also Babun[1] which is a pre-configured Cygwin with a lot of addons as they say themselves. It also uses oh-my-zhs.

When I have to use a Windows OS for some reason I install this, it at least makes me feel a little bit at home.

[1]http://babun.github.io/

Post reply on HN