Settings

Theme

Ask HN: Have any of you switched to Bash on Windows?

70 points by ywecur 10 years ago · 69 comments · 1 min read

Reader

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?

jhugg 10 years ago

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.

  • kyriakos 10 years ago

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

oldsj 10 years ago

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.

  • gravypod 10 years ago

    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/

    • oldsj 10 years ago

      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

    • michaelmrose 10 years ago

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

      • gravypod 10 years ago

        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.

        • michaelmrose 10 years ago

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

          • gravypod 10 years ago

            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.

  • chair-law 10 years ago

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

    • oldsj 10 years ago

      I am actually, no email address in your profile tho

      • chair-law 10 years ago

        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.

      • chair-law 10 years ago

        Thought I just added it?

lj3 10 years ago

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.

  • ryanlol 10 years ago

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

    • lj3 10 years ago

      > 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
        /root
      
      What do you see?
lnanek2 10 years ago

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!

ghurkan 10 years ago

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.

  • ZanyProgrammer 10 years ago

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

    • ghurkan 10 years ago

      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.

ryanlol 10 years ago

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/

NobleSir 10 years ago

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.

stephenr 10 years ago

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.

  • dolguldur 10 years ago

    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.

DennisAleynikov 10 years ago

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.

  • kyriakos 10 years ago

    Try it with conemu instead of the regular command prompt.

    • stuxnet79 10 years ago

      +1

      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.

    • brianjking 10 years ago

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

davidgerard 10 years ago

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.

  • JdeBP 10 years ago

    > 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

vinniedaarm 10 years ago

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.

KayL 10 years ago

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

naakkupoochi 10 years ago

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

facorreia 10 years ago

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.

ams6110 10 years ago

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.

alexeiz 10 years ago

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.

mcdevhammer 10 years ago

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

  • electricEmu 10 years ago

    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

vram22 10 years ago

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.

PeterWhittaker 10 years ago

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

voltagex_ 10 years ago

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.

anthnguyen94 10 years ago

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.

lacker 10 years ago

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.

captnsamoil 10 years ago

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

  • damieng 10 years ago

    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 :)

    • JorgeGT 10 years ago

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

Scarbutt 10 years ago

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

  • unlinker 10 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection