Live data from Hacker News

What’s New in Bash/WSL and Windows Console

blogs.msdn.microsoft.com

231–240 of 251 posts

Re: What’s New in Bash/WSL and Windows Console

#231
post #122
post #76

Earlier quoted context omitted.

Microsoft: I suspect this blog post is out of date and that, post creators update, this is now safe. If so, maybe you want to edit it?

Wait so you CAN edit linux filesystem files with windows tools now? That was the main tripping point for me last time I tried out the WSL workflow. Mainly just because a bunch of files in our repo were apparently named in an ntfs unfriendly manner, so when I tried to merge etc. the repo would get corrupted.

NO!

Don't assume that just because the post hasn't been updated in a couple of months that it's somehow been magically "fixed" - it hasn't. In fact, its actually a really tricky problem to solve, and it'll take some time, a great deal of care, and some very well thought-out engineering before we arrive at a fix!

If/when we do fix the underlying issues we'll update this post and publish a new post announcing that the coast is clear ... until then, DO NOT CREATE/MODIFY THE LINUX FILESYSTEM USING WINDOWS TOOLS.

Thanks.

Re: What’s New in Bash/WSL and Windows Console

#232

Earlier quoted context omitted.

Could you add a brief summary of the video for those who prefer text for bandwidth (digital or cognitive) reasons?

sure. The guy in the video is a popular youtube personality; his name is Jerry Berg. He is an ex-Microsoft employee who worked on Windows and had access to Microsoft's internal SQL servers used to collect problem reports. He makes a few points in the video. 1. In the Terms & Conditions, Microsoft claims they get your IMEI number from mobile connect devices as part of their telemetry and then go on to say it's not PII…

Although he makes some good points, I would encourage some healthy skepticism over claims and statements made by ex-Microsoft employees about a company that has changed significantly in the 3 years since he was sadly laid-off.

I know this because until I returned to Microsoft last year ... to help modernize the Windows Console, and deliver Bash on Windows ... I too was an ex-Microsoftie having left the company in 2010 after 10 years as an MSFT employee.

This company has changed and improved A LOT during my 6 year absence and, while yes, we have a lot yet to improve, I can attest that our intentions are genuine, credible and increasingly transparent, to the point that we recently published details on the telemetry that Windows collects and aggregates (https://arstechnica.com/information-technology/2017/04/micro...) and we even provide a site where you can go and manage/clear your privacy data (https://account.microsoft.com/privacy/)!

Re: What’s New in Bash/WSL and Windows Console

#233

Earlier quoted context omitted.

There is an ancient story about an old ship with all its parts replaced and the question was when does it stop being the old ship and become a new ship? If Windows has a Linux kernel, is it still Windows? I guess Windows is whatever Microsoft calls Windows?

Windows started on the DOS kernel, so switching to a new kernel wouldn't dismantle the whole product. Although I don't see a reason why NT should be inferior to Linux from Microsoft's perspective.

DOS had no kernel - it was just a bunch of code that ran on top of a bunch of PC-compatible hardware. There was no separation between kernel-space and user-space.

Re: What’s New in Bash/WSL and Windows Console

#234

I have switched to WSL pretty exactly a month ago after using solely Ubuntu for about 6 years. So far it works like a charm. The only small problem i have had was the network interface problem with nodejs (which should be solved with the new WSL). But that can be circumvented by simply running node.exe instead. The reason for the switch was: windows in great for everything UI, bash is great for everything development…

Edit: Just updated to Ubunut 16.04 and as promised by MS all my node network problems are gone.

Re: What’s New in Bash/WSL and Windows Console

#235

Earlier quoted context omitted.

Windows started on the DOS kernel, so switching to a new kernel wouldn't dismantle the whole product. Although I don't see a reason why NT should be inferior to Linux from Microsoft's perspective.

DOS had no kernel - it was just a bunch of code that ran on top of a bunch of PC-compatible hardware. There was no separation between kernel-space and user-space.

You are applying an overly restrictive definition to something that is just the nut analogy, which is a vague analogy that does not imply "spaces".

MS/PC-DOS, and DR-DOS, were not just "a bunch of code" and had a definite structure when it came to operating system design. They comprised the basic disc operating system, the basic input/output system (incorporating built-in and loadable device drivers), the command processor, and the housekeeping utilities.

* https://superuser.com/a/329479

The kernel of (386 Enhanced Mode) DOS+Windows analogous to the Windows NT kernel being discussed here is the VMM and the VxDs, with krnl386.exe as a distinguished Extended DOS program running in the distinguished system VM.

* http://jdebp.eu./FGA/dos-windows-boot-process.html

Re: What’s New in Bash/WSL and Windows Console

#236
post #161
post #85

WOW. cmd can actually parse escape codes now AND run Linux scripts! What a time to be alive. I've been using WSL for the last year now on my Surface Pro 4, and it has been nothing short of fantastic. This bridges a HUGE gap that made the MacBook attractive.

It's funny that it took so long to re-implement escape codes, while they already had support for escape codes in DOS sessions via ANSI.SYS since MS-DOS 2.0 :) https://en.wikipedia.org/wiki/ANSI.SYS

A more thoughtful critique is that it is sad that it took so long to make the console support the POSIX General Terminal Interface and terminal control codes, considering that the Windows NT Subsystem for Unix Applications (a.k.a. Interix) already had all of this working and Microsoft owned the code.

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

Re: What’s New in Bash/WSL and Windows Console

#237
post #36
post #13

Earlier quoted context omitted.

I recently tried starting Windows CLI programs from within bash and it worked just fine, but you have to specify the entire filename, like "./notepad.exe".

This is usually because, by default on many Linux flavours, the current directory is not included in your path environment variable.

Actually, given what Osiris appears to be getting at, it is because Unix shells in general have no notion of a PATHEXT system, and so do not go around tacking .COM, .CMD, .EXE, and the like onto the ends of command names.

The not searching the current directory is well known in the Unix and Linux world; and to be fair so too is the idea that if the filename of one's executable Perl script ends in .pl, or the filename of one's executable shell script ends in .sh, then the .pl and the .sh have to be explicit in the command name that one types. The idea that one can run notepad.exe with just notepad comes very much from the DOS and Windows world, here.

The Windows NT POSIX Subsystem actually provided a whole bunch of shims so that one could run various Win32 housekeeping utilities from a POSIX shell without explicitly adding ".exe", and a Korn shell adjustment to allow case-insensitive searches for Win32 commands.

* https://technet.microsoft.com/en-gb/library/bb463210.aspx

Re: What’s New in Bash/WSL and Windows Console

#238
post #185

Windows Console question here! :) Are there any plans to support GNU Readline shortcuts such as history searching with Ctrl-R directly in the Windows Console? I'm mostly using WSL to run the PostgreSQL CLI with the standard keyboard behavior. It would be nice to be able to do that without having to install WSL.

I would say that's not very high on our backlog. That sounds like something that we'd need to implement directly in cmd.exe (the shell), not conhost.exe (the terminal) and changing cmd's behavior is VERY HARD to do without somehow breaking the world.

Actually, command line editing and history recall for such programs is in the console. That's where the actual mechanism of DOSKEY lives. That's where history recall lives, governed by SetConsoleHistoryInfo().

One can of course write command interpreters that have their own editing systems, rather than use the one provided by the console. JP Software has done this for many years.

* https://jpsoft.com/help/index.htm?cmdhist.htm

But tofflos is asking about improving the one that is in the console.

Re: What’s New in Bash/WSL and Windows Console

#239
post #29

Earlier quoted context omitted.

I used Ubuntu Server LTS a couple of times. The 14.04 version which is supported until 2019 still has the bug that it won't clear out old kernels after upgrading them. So if you don't look into your /boot partition now and then it fills up and breaks your installation.

Can you link to a bug report? dist-upgrade (as opposed to upgrade) should remove the old packages;that's its whole point...

Xe could hyperlink you to Dustin Kirkland's call for feedback here on Hacker News only a short while ago, where this subject came up several times. This is a well-known Ubuntu problem, and M. Kirkland xyrself said that taking purge-old-kernels out of the byobu package and putting it somewhere more obvious was a good idea.

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

Of course, this is an Ubuntu upgrade problem relating to Linux. It is specifically about kernel image files. So it has very little application to the Windows NT Linux Subsystem, which as we know uses the Windows NT kernel.

Re: What’s New in Bash/WSL and Windows Console

#240
post #39

Earlier quoted context omitted.

If you're asking why Microsoft's advice is to format and reinstall, well, consider who it's coming from.

Because you can upgrade from windows 3.11 all the way to 10, good luck with ubuntu. Yeah, I see your point.

There are people who have done it all of the way from Windows 1.
Post reply on HN