News for hackers. Stuff that matters.
Re:Ask HN: Have any of you switched to Bash on Windows? by lj3 on Sunday May 29, 2016 @08:39PM (#11798956)
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.

Re:Ask HN: Have any of you switched to Bash on Windows? by ryanlol on Sunday May 29, 2016 @08:44PM (#11798971)
> 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.

Re:Ask HN: Have any of you switched to Bash on Windows? by lj3 on Sunday May 29, 2016 @09:00PM (#11799009)
> 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?
Re:Ask HN: Have any of you switched to Bash on Windows? by kyriakos on Sunday May 29, 2016 @11:26PM (#11799397)
The first version only run as root. From the second release they added user creation when installing.
Re:Ask HN: Have any of you switched to Bash on Windows? by JdeBP on Tuesday May 31, 2016 @09:55AM (#11806494)
Actually, the first version never ran as root. It always ran as you, incorrectly reporting the user account.
Re:Ask HN: Have any of you switched to Bash on Windows? by lj3 on Monday May 30, 2016 @12:12AM (#11799514)
Great! Maybe I should remove it and re-install and see if I can trigger that.
Re:Ask HN: Have any of you switched to Bash on Windows? by pugwash on Monday May 30, 2016 @07:10PM (#11803733)
No need, you can use lxrun /setdefaultuser to change it.

https://msdn.microsoft.com/en-us/commandline/wsl/user_suppor...

Re:Ask HN: Have any of you switched to Bash on Windows? by JorgeGT on Sunday May 29, 2016 @11:01PM (#11799324)
In the latest build the installation script asks you to create an Unix user that becomes the default user (with sudo rights).