Live data from Hacker News

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

news.ycombinator.com

11–20 of 53 posts

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

#11
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…

I remember I cut down a lot of the cyg shell startup time by removing a lot of the completion files I wasn't actively using from .bashrc.

But yes, it is generally slower. I'm much happier to be back to Linux these days.

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

#12
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…

[deleted]

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

#13
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…

It's actually not bashrc that is the direct culprit but a few issues with how Cygwin emulates posix.

Best solution is to edit /etc/bash_completion.d and remove anything you don't need this can shave off 2-3 seconds of the load time.

Since windows now should have a native fork() call Cygwin might be updated on its own which will make it about as fast as a native nix system, that said Cygwin will need to make a dedicated version for windows 10 for this to work.

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

#14
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…

[deleted]

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

#15
post #2

Why not a Virtual Machine on your PC?

A virtual machine is a hideous amount of overhead for a shell, not least because a lot of people like to drop to a shell specifically for its low resource consumption for large tasks. It's a valid solution, yes, but I would rank it below Bash on Windows 10 in any form.

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

#16
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. Otherwise it seems to work for most of my use cases.

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

#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-...

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

#18
If you're switching platforms you should test the software you plan to run, there are still some small gaps that may kill your workflow (eg zeromq doesn't run out of the box, which means jupyter doesn't either).

It's been pretty good to me, but I'm normally a Windows user, so roadblocks in WSL just send me back to my old workflows rather than causing me headaches.

Post reply on HN