People of a certain age remembered well the power and simplicity of using DOS and its "console" to effectively develop code and debug, even without typing 'win' to get into "GUI mode".
But at this event a very senior engineer/architect in the Windows group (no longer with Microsoft) responded to my question of command line support with a very snarky response which was something along the lines of "It is called Windows not relic from the 70's so no, we really don't care if you can't use it like a time sharing system any more." And that was the way it was, anything you could do on the command line you could do in a GUI window with radio buttons and various text boxes.
And what was why I switched to MacOS as my daily driver because my personal style had me so much more productive in "terminal" mode than in "gui" mode, I preferred it.
Now you have Microsoft investing real time and effort to create credible command line type tools in their system and it is a remarkably good thing. I use WLS every day and its getting better and better. I have suggested they implement a local network service equivalent of the USB over Ethernet service so that you can easily share USB devices between the Windows side and the Linux side, the up coming visual fixes will address many of the minor annoyances. That is a really huge shift for Microsoft.
While one can do at least as much, if not more, via a variety of command-line tools, the integrated build & debug workflow of a good IDE is invaluable to many. Esp. for those for whom learning a multitude of command-line tools, and syntaxes to drive gdb, profilers, etc. as a little costly/cumbersome.
First VS Core, now VS proper. Impressive!
(going back to my ddd window on Linux, crying a bit inside).
The Erlang/OTP 19.x releases are still broken because of some missing system calls. They seem to have an incoming fix though: https://github.com/Microsoft/BashOnWindows/issues/613
It's great that they keep open conversations like this for issue tracking and hopefully April will be working 100% by then.
But they really need to fix notepad so it supports unix style line endings. That part of the demo was a bit embarrassing.
Making "Winbuntu" a fully compatible Ubuntu sounds like a really lofty goal, especially when it comes to things that expect a Linux file system.
I guess for me, it's easier to reason about Linux in a VM (or maybe a container), with all the limitations of that approach, than it is to wonder what surprise might occur as a result of trying to run something on Winbuntu. At some point maybe that will shift. It's not like VMs are exactly like bare metal.
Keeping trying hard Microsoft! I like Winbuntu enough that I bought a Windows 10 laptop just to play with it! Emphasis on play, not seriously use.
A few years back, following my previous laptop which had been a flimsy Acer running Ubuntu which became unusable following malfunction of the fan, I was looking for a more sturdy laptop and ended up buying a mid-2012 15" MacBook Pro which came with OS X Mountain Lion I think it was. Being used to case-sensitivity from various Linux distros and on my FreeBSD servers, I decided to enable case-sensitivity for the system drive. That turned out to be quite a mistake indeed. Several pieces of software were unable to find the files they needed, so I ended up reinstalling the whole system shortly after, this time without case-sensitivity.
Following that I had a hardware problem that the Apple authorized repairshops I went to were unable to fix three times in a row so I ended up demanding a refund (Norwegian customer protection laws are good in this regard), and while I still think OS X is an impressive system I lost a bit of my respect for Apple after that experience. (I enjoy my iPod touch though.) Anyway, the reason I mention this is just to say, I don't know if case-sensitivity remains problematic in macOS. I find it highly likely that it still is though.
I was already a fan of colinux back then but this has te potential of being infinitely better.
Inception ... noitpecnI ;)
An alternative approach would be to call it Winbuntu, Winux, or simply Ubuntu for <windows subsystem architecture>. Then aggressively maintain a list of known compatibility issues, and stay on top of fixing them. Maybe even open source it?! A close sourced, not-quite-what-I-wanted solution is simply less interesting to me.
The speed at which they can push new builds to people who aren't on Windows Insider is a bit unfortunate, though.
You need to handle this anyways, as it's unlikely that your target deploy platform will always be ubuntu. In any case, you can just use docker like most OSX folks do now.
So I can basically do `code .` from inside bash and it will open VS Code in the linux sub-system folder? That's amazing!
It has worked well for me to make a symlink under ~ to /mnt/c/Users/myaccount/, and that way anything under that symlinked folder is visible to WSL and Windows programs.
If you just want to type `code <filespec>` (without the .exe), then you can create an alias that resolves to code.exe.
Same for Notepad, etc. :)
Hey Rich, can you (or colleagues) tell us any news on console? I get the vibe from Michael Niksa back in August [1] [2] there's a big changes happening that will fix readline-type stuff and I'd love to know more about this - I use ConEmu / Win32 SSH on Windows and it, was well as bash, seem to occasionally suffer from terminal-corrupting weirdnesses.
I'd love to know more about the causes, the fixes, whether the fixes will make it into Creators Update, etc.
[1] https://github.com/Microsoft/BashOnWindows/issues/111#issuec...
[2] https://github.com/Microsoft/BashOnWindows/issues/111#issuec...
It's important to remember that the Console was one of the first things Cutler & team implemented when they started NT itself, and it's been updated, patched, partially-enhanced and modified quite a few times in the last 30+ years! ;)
We're in the process of modularizing much of the Console's internals, replacing particularly archaic parts with shiny new modern C++ collections, etc., removing unnecessary cruft, etc. ... while trying not to break anyone!
Much of the work we're doing right now will result in Maximus5 & the Console2 / ConsoleZ / etc. teams having to jump through far fewer hoops to implement decent terminals on Windows.
And while we're doing this, we're also enhancing the console to support *NIX VT sequences, adding 24-bit color, etc., working with several other teams around Microsoft who need Console changes to make their things work.
This week, we are planning & building features for the NEXT OS release!
As you can imagine, it takes considerable effort and care to do this and we've got a great team with Michael, Paul, Mike2 & Austin beavering away as I type.
Actually; small lie - Niksa is on vacation this week re-charging his fuel cells before I chain him to his desk again ;)
We'll be writing a series of blog posts in the coming weeks, summarizing what's new in Bash & Console in Creators Update, and will have some cool stuff to show off at Build 2017!
I'll also be speaking at OSCON 2017 in Austin (same week as Build!!), so stop-by if you're in TX and want to chat about Bash / Console :)
https://conferences.oreilly.com/oscon/oscon-tx/public/schedu...
Regarding future work, are there any plans to make the emulated Linux filesystem usable in the rest of Windows e.g. via a drive mapping?
We are keen to smooth out some of the filesystem interop challenges. There's a reason we've not yet removed the Beta label ;)
For example, using windows explorer to edit linux sub-system files would be a big no-no.
However, it's fine to modify files stored in your Windows filesystem from within Bash, so if you were in `/mnt/c/dev/project/` and launched `code.exe ./`, Code would open the current (Windows-accessible) folder.
There is some weirdness with the recommended file system sharing. Git on WSL sees files as modified after they have been checked in from Windows. It means I either use Git from the IDE or from the terminal, but not both.
Excited to see how this continues to improve.
What you're seeing with git is likely to be caused by line ending differences. You've probably got "Convert line endings to Windows" configured in your Git on Windows, but "Checkout Linux line endings on Linux". Either way, both should match otherwise all your files will look different because ... well ... they will be ;)
HTH
EDIT: Actually, since I am doing that as well, I just tested it. And yes, it all works!
In the Cygnal project (http://www.kylheku.com/cygnal) I made a few fixes to this code.
With Cygnal you can write a terminal-oriented application using termios and VT100 escape sequences (or a library like ncurses if you wish). You just package it with the cygnal DLL, and any other DLL's. It will run fine in the console window.
For a demo of this, download the Windows installer for the TXR language.
https://bintray.com/kazinator/Binaries/TXR/txr-169
The txr.exe executable happily runs out of the cmd.exe console window with history, multi-line editing, etc. There is not a shred of Win32 code in TXR: it's just (a much enhanced fork of) the Linenoise library which uses termios and ANSI codes. Not a single #ifdef WIN32 in there.
I've loved the idea of bash-on-windows but it was missing just enough that it wasn't worth it moving away from my current love affair with the "git bash" system I'm using.
With these changes, it looks like I'll be jumping ship when it comes to stable!
Great work to everyone involved!
I can finally ping, do ifconfig etc.
Even htop runs. I am amazed! http://imgur.com/7P2J64h
We are, however, continuing to work on solving these and several other networking issues to close the gap in our networking support.
As a work-around, you could always call Windows' tracert.exe via the interop feature ;)
An if you're just using standard sockets technologies (e.g. HTTP, TLS, FTP, SSH, etc.) all should be good.
Think of it the other way. Why would you use wine if you could just run Windows in a VM? :)
is it really? last time I read tests WSL was slower than VMs
It would be nice to work from Windows but build for Linux that way, for other languages too.
The article was talking about Windows Subsystem for Linux, and my comment was that VS can do C/C++ for Linux. I thought that was implied by the context.
Anyways, I know VS has done C/C++ for forever. :)
Does this mean tmux will work?
Now, there are many, MANY, improvements required of Windows' Console which is currently receiving its biggest overhaul in > 30 years! Bear with us while we give the Console some much needed TLC and start to re-shape it into a clean Console infrastructure that supports modern Console demands.
- vt sequences fixed (so stuff like colored output, midnight commander, etc work and the terminal doesn't screw up)
- Elixir and Go work
- Also Postgres and MySQL
- You can launch Windows apps from bash.
- inotify works
- Visual Studio can compile with GNU/Linux C/C++ tools, gdb, linker etc
There's some recent fast ring info on: https://blogs.msdn.microsoft.com/commandline/2017/01/09/bash...
From reading that blog, and also: https://github.com/Microsoft/BashOnWindows/issues/111#issuec... it sounds as if the Windows console (separate from bash, openssh, powershell etc) is being entirely refactored for creators update. So those fixes should also help powershell, ConEmu and a bunch of other common windows command line stuff.