Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Have any of you switched to Bash on Windows?
70 points by ywecur on May 29, 2016 | hide | past | favorite | 65 comments
I've owned a Mac for about a year now, and it's worked very well. I do however miss being able to game on my laptop, and with the announcement of Bash on Windows I'm thinking of making Windows my sole environment.

Those of you who have tried this: What's your experience been like? Is it inferior in any significant way to your workflow?

1) It’s super cool that it works.

2) It’s not ready yet. Lots of stuff doesn’t work, though much does.

3) It’s oddly separate from Windows, which makes perfect sense, but the unix is so much less integrated than mac (or obviously linux) systems are.

3a) Not being able to launch windows binaries from Bash makes scripting hybrid stuff hard. I think this will be fixed at some point.

3b) I’m not sure if the windows file explorer can see the ubuntu root fs. Could be wrong here.

It seems that once it goes 1.0, it will have some advantages over a VM with shared files, but also a few disadvantages.

3b) it does. The Linux files are just regular files in ntfs under some obscure path.

So I got all excited and bought a Dell xps 13. I originally just wanted a laptop that would work great with linux but of course it turned out to be more work than it was worth so I switched to win10. I joined the windows insider program and messed with bash on Windows for a few hours but found that it's definitely not ready yet. It's a great idea and I'm glad they are working on it but simple thing like hitting ctrl+x to exit nano would crash the whole terminal. Anyways I switched to the git sdk with pacman and that actually was a very decent substitute. Unfortunately, the bottom half of my xps's screen went out after owning it for 3 months, and Dell support has had the thing in the shop for almost a month now. I vividly remember now why I left the windows scene and recently got a retina MacBook pro. I know I'm a little off topic but put bettertouchtool on it with Windows style window snapping and it's a far superior experience in my opinion.

If you are still looking for a way to get into Linux I'd strongly recommend trying Manjaro [0] XFCE (Not any of the other versions).

I've yet to have a computer that was made in the past 5 years that I haven't been able to get it running on. It's amazing.

If you start it with the non-free (as in libre) installer, you'll definitely get near perfect hardware support. You'll need to install two packages if you want good battery life (TLP and thermald).

After that, it's ready for production use on almost every system I've tried.

If you like it/try it I'd like to see how it works out for you so try and contact me and tell me how it went. I might try starting to recommend this for some family I know who get viruses but don't do much else but Youtube and Facebook.

[0] - https://manjaro.github.io/

I appreciate it but I'm not all that new to linux. I'm not a huge fan of Manjaro because they are downstream of Arch, and therefore any security updates are in the hads of the few maintainers. I ran arch for about a year and that was probably the best experience I've had with linux on the desktop. I just feel like in 2016 the desktop should be a solved problem but I just keep getting disappointed haha. I'll probably change my mind again next week but oh well

I really wish people would stop pushing manjaro quite so hard for newbies to linux I honestly don't think its an optimal choice.

It really does just work. I'm fairly stupid, and I've not had any problems with it.

I have a rule of thumb: I try to NEVER touch the console for my non-development OS. Manjaro allows me to accomplish that and it also works on most hardware I've tested it on.

Why would never touching console be a goal I use the console for basic tasks and find it effective and useful.

You and I will have a very easy time navigating the world of a command prompt, the average user will not.

There is a reason GUIs won out over terminals, and that is because no one in the main stream wants to touch one.

A good OS should allow you to do every necessary task via a GUI. If there is a Linux DE/WM that can provide an experience like that, I feel like GNU/Linux will have its break through in the consumer market.

I use my "I never need to do something in the terminal" as a basic user acceptance test.

Shoot me some sort of message if you are trying to sell the xps 13.

I am actually, no email address in your profile tho

HN is a bit intuitive how they control emails. I added my email to the box marked 'email' and expected it to show up. Looks like you have to explicitly add it to your 'about' box. Should be there now.

Yea I just realized that when I checked my own profile haha

Thought I just added it?

I've been using it for a while now. There are lots of small annoyances, like every file appearing with a green highlight because it doesn't know how to deal with NTFS (for some reason it thinks everything is other-writable).

Also, if you use the ext2 volume manager to access EXT3 or EXT4 drives, they don't show up in bash at all. I haven't figured out why yet.

I was able to install ZSH after some fiddling with ZSH and compiling a custom version. That was a month or two ago, though. I don't know if that's necessary anymore or if they fixed the issue. But, everytime I run bash.exe I have to switch to ZSH manually. For whatever reason, chsh thinks zsh is an invalid shell.

A bigger issue, for me, is it runs as root by default. I was able to create another user and manually switch over using 'su', but it's an annoyance. I haven't figured out how to automatically start a session as a non-root user using zsh. Actually, scratch that... I just added /bin/zsh to the bottom of my .bashrc file and it works.

Another downside is the linux subsystem has no awareness of the rest of windows and vice versa. I imagine that kind of integration is going to take some time, but I look forward to being able to automate my windows programs with bash!

All the things I need it to do work, though. I use vim and grep and search and all those lovely features that I call my "zsh ide".

So, on the whole... I wouldn't use it as my primary daily driver yet, especially considering you have to sign up for the windows 10 dev updates in order to get it. Every morning when I wake up it's a coin flip whether the machine will work or decide not to render drop down menus (just as an example...).

But, when they finally get it working and release it as standard, it'll be marvelous. Much, much faster and easier than running a VM or Cygwin.

> I don't know if that's necessary anymore or if they fixed the issue

Definitely worked with just apt-get for me.

>A bigger issue, for me, is it runs as root by default. I was able to create another user and manually switch over using 'su', but it's an annoyance. I haven't figured out how to automatically start a session as a non-root user using zsh.

Huh? It does not run as root by default.

> Definitely worked with just apt-get for me.

The install worked, but running it was a different story. It would spit out an error after every command. Like I said, this was a while back. It's probably fixed now.

> Huh? It does not run as root by default.

When I run bash.exe, I'm greeted with this prompt

  root@DESKTOP-F7NGQJX:~# pwd
What do you see?

The first version only run as root. From the second release they added user creation when installing.

Actually, the first version never ran as root. It always ran as you, incorrectly reporting the user account.

Great! Maybe I should remove it and re-install and see if I can trigger that.

No need, you can use lxrun /setdefaultuser to change it.


In the latest build the installation script asks you to create an Unix user that becomes the default user (with sudo rights).

Usually I use Cygwin. Have for many years. If I ever hear Bash on Windows gets a feature that doesn't have, maybe I'll check it out!

You can apt-get anything you find on Ubuntu.

There is no need to run setup.exe each time and hope somebody ported it to Cygwin.

You can't apt-get in cygwin, but you can apt-cyg:


I don't think you can install anything X.

Yes you can, I just tested xclock.

Sorry, xclock is not good enough. I need at least xeyes to work.

i use cygwin as well, but there is enough cruft around the edges that i would drop it in a heartbeat for something more polished and less hacky.

accidentally typing ls in a regular ol' windows command prompt leading to explosive crashes drives me slightly nuts from time to time for instance...

From what I've heard so far Bash on Windows is, right now, the exact opposite of polished. Cygwin does suck a lot of the times, but I've become used to its idiosyncrasies so I'm just waiting for all the kinks to be ironed out before switching.

My experience so far: Installed Ruby in bash. Fetched some PDFs online by using a basic script. Didn't get any errors. As others may say, it's still buggy. It can't replace your work environment just yet. But it's constantly getting updated.

So silly question, is your Ruby installed in Bash accessible from normal Windows? And how?

You can access Linux files without bash. They are hidden under \AppData\Local\lxss\rootfs. But you can't run them without Bash. Also, you can use files in Windows right away too. So have both file structures for your disposal.

The thing that annoys me the most about is the fact that it is absolutely impossible to get useful google results regarding it. (Desperately needs a common acronym or more googleable name)

Otherwise it's been pretty awesome, despite some incompatibilities.

And oh, get ConEmu to fix the garbage cmd.exe https://conemu.github.io/

Msys2 fills the need you seem to be having for me: https://msys2.github.io/ it uses pacman for a package manager and has everything I've needed. The only thing windows + msys2 missed for me was xcode for writing iOS apps, but if you already have a mac, then it's not really a problem.

I find it hard to believe anyone was/is using OS X instead of Windows just for Bash.

Every Mac since the switch to Intel processors has built in support for dual-booting Windows. If you want to play games that don't run on OS X, boot into Windows and play your game.

I am struggling to understand the concept of compromising your working environment so much, just for the ability to play games without a reboot.

I would imagine the productivity losses in a single hour of working would be more time than is required for two full reboots - into Windows and back to OS X.

I couldn't agree more! An OS is so much more than just the bash shell. There are countless annoyances on Windows that constantly get in the way.

Some flaws you have to witness to actually believe. As an example, I'd go as far as saying that Windows doesn't support high DPI (retina) displays. It does, but it's broken to a degree that I considered switching the hardware. If you're running a setup with both high DPI and regular DPI screens, be prepared to constantly manage your windows because Windows fucks them up all the time. The bad support for multiple displays doesn't help there either.

In theory the OS might be able to support these setups well, but dozens of included programs fail to comply. Even major ones like the password prompt. For programs not included, I have yet to see any to scale properly.

This thing where the included programs serve as examples of how a decent program should look and feel like, I think this just never existed on Windows.

Any Mac user considering using Windows more I'd suggest to try it for some time. Even if it's just to appreciate Mac OS again. OS X is getting worse, but they're still worlds apart.

I just had to switch from mac to windows upon losing my only mac workstation. I really hated the transition at first and bash on windows was my savior. It actually has apt-get and even though it's only on the preview builds for now it will become legit soon and be almost as useful as normal bash on any other nix system.

One of the most glaring issues is that it's contained in a windows-like terminal and the fonts are broken for non-standard characters.

Try it with conemu instead of the regular command prompt.


ConEmu is amazing. Right now I have it set such that each time I launch it, it opens a Cygwin tab and a regular Windows command prompt tab. Customization options are endless as well.

ConEmu is great, however, I'm finding it to be confusing in comparison to iTerm2.

When I'm stuck on Windows I install Cygwin and live in the Cygwin shell. It's almost like home.

I found it very useful for monitoring - instead of waiting for someone to write e.g. a Nagios script for the thing you want to keep an eye on, you can just write a bash script.

I have yet to have to try the official Microsoft bash. The question is whether it is competitive with Cygwin for these purposes. i.e., does it carry all the other GNU tools with it.

I gave up using Windows when the Windows rot got too bad after about a year and I couldn't be bothered reinstalling. YMMV.

> does it carry all the other GNU tools with it

That's the wrong question. Microsoft doesn't bundle toolsets with the Windows Subsystem for Linux. It provides a binary-compatible platform, and Ubuntu provides the toolsets. Or Fedora, people having already run Fedora on the Windows Subsystem for Linux.

So the right question is Does Ubuntu/Fedora carry all of the GNU tools?, subordinated by Do they require any of pseudo-terminals, framebuffers, signals to Win32 processes, or a proper daemon branch of the process tree?

* https://news.ycombinator.com/item?id=11581935

The only irritating thing for me so far is not being able to set the default shell to something other than bash. I love zsh (with oh-my-zsh installed). That works but I have to open a command prompt, type 'bash', and then type 'zsh'. Even doing a 'chsh -s /usr/bin/zsh' doesn't work.

There's still many bugs on Windows Bash. You couldn't 100% rely on it.

While in "bash on Windows" I happened to upgrade or uninstall packages and that caused the package manager to get into a cyclical dependency issue and could not install or update anything further. Could not do any sort of cleanup and the entire thing is now useless and don't know how to restore it to the initial state

lxrun is the command you need (from powershell/cmd)


I've made the switch to Bash, and the full Linux kernel and userland, a few years ago, and I've been loving it.

As for gaming, I have one HD on my machine with Windows, and I boot from it to play.

This has the added bonus of completely separating my "work" environment from my "play" environment.

I don't use Windows much these days and haven't tried "Bash on Windows" but for many years I regularly used bash in cygwin on Windows. At the time I used PuTTYcyg (https://code.google.com/archive/p/puttycyg/) for my terminal emulator (apparenlty no longer maintained).

I remember it all working very nicely with little perceptible difference from working on Linux.

This Bash on Windows is not created to replace Ubuntu desktop. It's created for running Ubuntu in the Windows-based cloud, Azure. You can already run Linux services in Azure with Docker, but the performance is sub-par, because Docker for Windows currently relies on VirtualBox. But once the new Docker is available (that uses HyperV) with better performance, Bash on Windows will be instantly obsolete.

I haven't tried it yet (still running 7) but I use the git bash shell all the time. Can anyone chime in on what the bash in Windows 10 gives you that git bash doesnt? Not that I've really fully explored but git bash seems to have a lot of the common utilities (it has grep and vim).

Git bash is just a subset of the minimum tools to get git working. Windows 10 bash can run apt-get, ssh, and a full python/ruby *nix environment

fyi windows git bash does ssh fine.

For anyone interested in a lightweight partial solution, the Ch suite of tools (that runs on Windows) from SoftIntegration.com includes many common Unix command line tools. I first got it for the C interpreter, then found the other features, and use some of them.

Is there a decent Windows equivalent to homebrew? I've read of scoop, but have no experience with it.

I think you're looking for https://chocolatey.org/ maybe?

The issue will be that they need to ship a whole new version of Windows for major (syscall-side) improvements - this isn't a problem with the Insider program, but you really don't want to be running Insider builds on your primary dev machine.

I've had it since it first came out, it's miles better now than it was at first and I'm sure once it hits 1.0 it'll be usable for some dev work. Still going to stick with my Ubuntu book for full stack at the moment though.

I tried, but it got bogged down with bugs in the installation / setup process. Seems like it just isn't quite ready for prime time yet, which is fair because Microsoft hasn't really claimed it is yet.

The true question here would be: When should we expect Fish for Windows?

It's a Linux subsystem with apt-get access to Ubuntu packages.

# apt-get install fish

# fish

Welcome to fish, the friendly interactive shell Type help for instructions on how to use fish

There you go :)

I think the name confuses people; it is not just bash, it is the entire Ubuntu user space!

There is this thing called 'virtual machines' and you can run a linux one in windows.

I use vagrant and it's great. I connect to it through ssh with puttytray and it's like the real thing.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact