
Invoke Win32 applications with Bash on Windows - jackhammons
https://msdn.microsoft.com/en-us/commandline/wsl/interop
======
kyriakos
This finally makes bash on windows functional. It was one of its limitations
that made it feel disconnected from the rest of Windows.

~~~
TimTheTinker
It also introduces potentially significant new attack surface.

~~~
dspillett
Any more so than, say, using bash and friends via cygwin or similar?

~~~
criddell
Maybe. Cygwin is old code and sometimes that's better than new code from a
security point of view.

------
0xFFC
Wow, this is really impressive. Last time I worked with bash on Windows it
felt like isolated island. But with this. I think it is a viable option right
now. The only down side to it is slow file system operations. Compiling a
single toy kernel (xv6) would take much longer than Linux.

This is amazing, now I can have emacs server in Linux running through bash
with windows service manager.

This is fucking awesome. I hope they improve thing further and further.

The only and biggest problem : Windows ridiculous conemu. I am not going use a
console which I can't resize without any problem. For the sake of God they
don't have unlimited buffer option and hide scrollbar (permanently) or resize
window without messing up text.

~~~
ZenoArrow
> "Windows ridiculous conemu. I am not going use a console which I can't
> resize without any problem."

Sorry I don't follow. What resizing problems are you having with ConEmu? Works
fine when I've tried it. We are talking about the same ConEmu, right?

[http://conemu.github.io/en/](http://conemu.github.io/en/)

[http://conemu.github.io/en/ResizeAndMove.html](http://conemu.github.io/en/ResizeAndMove.html)

~~~
TazeTSchnitzel
The way they phrased it suggests they were referring to the default Windows NT
terminal emulator, rather than Conemu.

~~~
ZenoArrow
I would agree with you, but that'd be the first time I've ever heard that
called ConEmu. It's much more likely to be called the Windows command shell,
Windows command prompt or cmd. As you're clearly already aware, ConEmu is a
specific product that provides an enhanced command line experience on Windows.

~~~
frutiger
FWIW, `cmd.exe` is both, the shell and the console. It is not a terminal (not
designed to be operated remotely) nor is it emulating a terminal of any kind.

As for the parent poster, they must be abusing the term `ConEmu`, a completely
separate console program that can run win32 programs (including `cmd.exe`).

~~~
WorldMaker
If it helps futher square some of the linguistics digressions the parts of
cmd.exe that are the console emulator are typically referred to as the
ConHost. The ConHost's console emulation is indeed not quite as great a lot of
people would like, which is why many Windows users use a different console
emulator named ConEmu. Obviously abbreviating the ability of ConHost's console
emulation to conemu rather than spell out "console emulation" causes confusion
with the ConEmu tool for Windows.

------
jongalloway2
There's a lot more technical information in this post (scroll below the video
for diagrams and writeup):
[https://blogs.msdn.microsoft.com/wsl/2016/10/19/windows-
and-...](https://blogs.msdn.microsoft.com/wsl/2016/10/19/windows-and-ubuntu-
interoperability/)

------
shados
Now they just need a better terminal emulator. Windows 10 made some minor but
much needed adjustment, but I still end up using Cmdr (a nicely preconfigured
ConEmu), and it's decent enough, but it pales over a nicely configured iTerm2
or what most popular Linux distros come with out of the box.

~~~
timgws
I second this. Someone porting iTerm2 to Windows would make my day.

------
NoGravitas
We're not on Windows 10 yet at my workplace, and I don't use Windows at home,
so I've only been following loosely in a "this will be nice once I'm finally
able to use it" way. But this bit took me by surprise:

> 1 Use the same working directory as the CMD or PowerShell prompt > 2 Are run
> under as the WSL default user > 3 Have the same Windows administrative
> rights as the calling process and terminal

1 and 3 are not surprising. But 2? There's a WSL default user? Windows users
aren't automatically mapped to unique Linux users? That seems problematic in
theory. How does it work out in practice?

~~~
WorldMaker
It seems to work pretty well in practice. The entire Ubuntu "system" is
essentially installed into a Windows User's home space, which means that all
of the Linux users are unique to a Windows user. This is useful in that you
can install things that need Linux accounts for services (like say postgresql
that uses a postgres user as a service account) and interact with it with sudo
-u just as you would on an ordinary Ubuntu machine. With the interesting bit
that the postgres user under my Windows user login would be different from the
one under a different Windows user on the same machine, but that also has some
advantages.

~~~
NoGravitas
Thanks. That is a helpful explanation.

------
apatters
If there's ever been a great opportunity to open source something in the
Windows client, it's WSL. A number of popular User Voice feature requests were
closed recently as not in scope, which is reasonable on the part of the WSL
team but shows that the demand for Linux-on-Windows is much greater than the
team's current objectives. If the project was open source and the team
accepted patches who knows where this thing could go. People want to run X,
they want device emulation, they want to run all kinds of apps that aren't
necessarily dev tools.

------
youdontknowtho
Oh, that's nice. That's what I was looking for in the first place.

As I'm reading the comments I keep seeing things that other people want to do
that I never thought of...that's awesome.

------
teh_klev
I'm guessing this solves:

[https://news.ycombinator.com/item?id=12715945](https://news.ycombinator.com/item?id=12715945)

------
Ultra_64
Embrace, extend and invoke? ;)

