Live data from Hacker News

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

news.ycombinator.com

41–50 of 53 posts

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

#41

Last I tried, absolutely not. There is a bug with TCP/IP that apparently prevents nodejs from doing anything networking related. So for example, express will not run because it can't find to the port to listen for HTTP. Its been documented and seemingly ignored by the bash team every time I've checked so I may stuck sticking with a laptop that doesn't have an escape key.. :( Proceed with caution, for now.

It's actually not being ignored, the fix is in active development: https://github.com/Microsoft/BashOnWindows/issues/468#issuec...

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

#42

In short: yes. I recently went through this with a new work laptop. I checked a couple boxes, restarted, and installed ConEmu. I added symlinks in my bash home directory for "c", "docs", and "downloads", and pinned my Linux installation as a favorite in Windows Explorer, which makes file management between the two systems incredibly easy. I installed git, and zsh, and a lot of the other basics. Zero issues. It's a no…

And recent insider update lets you install ubuntu 16.04 and run Windows commands from bash. Neat.

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

#43
post #17

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…

You can install 16.04 now, but you have to blow away your Linux install to do so https://blogs.msdn.microsoft.com/commandline/2016/10/19/wsl-...

I didn't have to. Upgraded nicely using do release upgrade

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

#45
post #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 secon…

One cannot infer the behaviour of the Windows Subsystem for Linux from the behaviour of Cygwin. The two are quite different things.

You're also being misled by the misleading "Bash on Windows" marketing name. It's not bash, even primarily. It's a "personality" subsystem for running Linux binaries on top of the Windows NT kernel. And that's what jiantastic is asking about: whether the subsystem, with what Linux programs it can run and what limitations it has, is "good enough" as a development environment, which includes considering everything from running compilers to hosting test rigs. Xe is not asking whether the Bourne Again shell is better than some other command interpreter.

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

#46
post #29

Earlier quoted context omitted.

I wonder if MS finds a way to port open source Linux apps in Windows 10.

They should start with systemd //sarcasm

See discussion at https://news.ycombinator.com/item?id=11416376

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

#47

But.. Why.. Why would you want to do that. And I am not asking to be clever. I just can't imagine why anyone wouldn't just run Linux?

Then that's a major failure of imagination. (-:

It's actually quite easy to imagine scenarios such as it is not your computer and the person whose computer it is (such as an employer) requires for whatever reasons that it run Windows.

That said, it should be noted that in many discussions of the Windows Subsystem for Linux people have observed that this is not being aimed at people who run Linux. This is being aimed at people who would otherwise be migrating from Windows to (say) a Mac. (And also at those who have already migrated, and might be reconsidering migrating back.)

For those people, jiantastic's question is important. They want to know whether their needs can be met by staying on Windows and using the Windows Subsystem for Linux, whether it is "good enough" as a development environment to do all of the things that they may need to do as a developer (from installing and running development tools to hosting test rigs), or whether it doesn't meet those needs and they should instead consider the more drastic course of replacing Windows with something else.

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

#48
post #31

Bash for Windows is open source, right? Is there anyway for me to get just bash binary to run? or build it from source and run it instead sign up for the insider program. I tried to signed up as insider a few times on couple win 10 systems, failed and completely gave up on that.

You're being misled by the misleading marketing name, too. This isn't the Bourne Again shell at all. It's a "personality" subsystem that lets one run Linux binaries directly on top of the Windows NT kernel. One of those binaries may well be the Bourne Again shell, but that is largely irrelevant. The Bourne Again shell binary comes from Canonical (or from RedHat if, say, you choose to experiment with running Fedora on the Windows Subsystem for Linux).

The part that comes from Microsoft is the Windows Subsystem for Linux, and of course the Windows NT kernel beneath it (and the Win32 subsystem alongside it). Unless something has changed recently, that is not open source.

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

#49
post #28

I do scientific programming using FORTRAN 90 and Python. I am Windows Insider with fast build releases set up in my Dell XPS. For my needs it has served well. But I request MS developers to give more control over how to utilize system resources more efficiently. It needs to be more transparent and documented for users of procexp.

A change in a recent build lets you see which particular OS process is using the CPU instead of previously all being combined into one.

I know this is not exactly what you are looking for but it's a step in the right direction.

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

#50

I've been using it for some web development tasks. Mainly for git, ssh, perusing my file system, and PHP/Python programming. It's worked well so far. For a terminal emulator, I set up Conemu ( https://conemu.github.io/ ) which is pretty swell. I hit a road block when I need to use vagrant for my development environment. I need to hop into powershell to fire up vagrant as virtualization doesn't seem to work in WSL. Ot…

In the latest build you can run Windows executables directly from bash so you can run vagrant from the windows installation without switching shell.
Post reply on HN