15 ms·
The Linux kernel hidden inside Windows 10
- coverband 10y agoI'd love to see a video of the demo session for this; really curious how ProcMon and AV tools will deal with ELF binaries in this release.
- Analemma_ 10y agoWill they even try? WSL isn't installed by default, you have to specifically ask for it, and presumably only a small percentage of Windows 10 installs are developers who'll be doing that. I don't know if malware writers will bother with it.
- sdrinf 10y agoScreenshot: http://imgur.com/a/5Fcr9 http://imgur.com/a/5Fcr9 Short summary: * Ubuntu, and all children apps run under current user's credentials, but are launched under an Lxssmanager servicehost process (as opposed to explorer.exe) * ProcMon can interact (send sigterm / etc to) unix processes; but as shown on htop, unix processes are not aware of windows ones; nor have I found any ways to send signals backwards * API compatibility is excellent. Last 2 days, I have re-compiled a full python & elasticsearch & mysql stack into this. Overhead is significantly lower, than any of the virtualization stacks * I don't use AV tools; however, I suspect they don't check for ELF files. Host system is mounted in /mnt/c , /mnt/d ,etc in LXSS, with current-windows-user creds * 2-command Sandbox reset: lxrun /uninstall & lxrun /install <- will restore the linux subsystem to factory default * LXSS root dir (/usr /var, etc) is in c:\Users\$username$\AppData\Local\lxss\rootfs\ ; home is mounted into c:\Users\$username$\AppData\Local\lxss\home\$username$\ And some caveats: * Filewatching (specifically, inotify_add_watch ) does not (yet) work * Manipulating files from the host occasionally makes it _disappear_ (??!) from visibility in the linux subsystem. Specifically, git pull from bash, then git update from host makes git update from bash impossible (index file open failed). Same problems with other types of host file-manipulation. This might be due to permissions, or somethings I haven't figured out yet.
- Zardoz84 10y agoAnd there is some strange behaviour with the keys. Actually using LXSS become far lees powerfull to the users of Conemu thanks to this. Vim and NeoVim does weird things with the arrows, on mc I can't navigate on the filesytem with the cursors, and htop does weird things.
- sdrinf 10y agoI suspect that might be conemu, and compatibility thereof. Specifically, running the bog-standard bash prompt (with conhost.exe) makes this a no-repro; all keys / arrows works in MC & htop
- GeorgeHahn 10y agoUnfortunately, it appears to be a design problem on the Microsoft side: https://github.com/Microsoft/BashOnWindows/issues/111#issuecomment-232733125 https://github.com/Microsoft/BashOnWindows/issues/111#issuec...
- Zekio 10y agoyou can get ubuntu bash into ConEmu with just: -new_console bash ~
- mmebane 10y agoOr, with current stable (160724), install "Bash on Ubuntu On Windows" (ugh), then in ConEmu, open the Tasks section in Settings and click "Add default tasks...", then Yes. You may want to add the tilde to the path, as it seems to open to /mnt/c/Users/<username>/. Also, I think it still messes with the keys, but not always. They seem to work fine right after starting it.
- deleted 10y ago[deleted]
- rrdharan 10y ago> unix processes are not aware of windows ones; nor have I found any ways to send signals backwards I haven't tried it out, but this project claims to offer support for doing exactly that: https://github.com/xilun/cbwin/ https://github.com/xilun/cbwin/
- ocdtrekkie 10y agoI am kinda hesitant to download and open a PDF file coming out of Black Hat 2016. EDIT: See child comment, GitHub preview is fantastic! Slides have a ton of great info.
- jacobwg 10y agoGitHub will actually render a full preview on the website, no download required. https://github.com/ionescu007/lxss/blob/master/The%20Linux%20kernel%20hidden%20inside%20windows%2010.pdf https://github.com/ionescu007/lxss/blob/master/The%20Linux%2...
- ocdtrekkie 10y agoAh, that's quite pleasant. And it doesn't even appear to use the browser's PDF renderer or anything.
- walkingolof 10y agoGuys, how do you think Black Hat 2017 is going to be funded if you dont download and open the PDF ? ;)
- whoopdedo 10y agoIf they're not able to make it silently download and execute remotely without me interacting or being aware, I feel they're not doing their jobs as black hats.
- CamperBob2 10y agoThe people who know how to do that are pulling down the big bucks on the Windows 10 team at Microsoft.
- kuschku 10y agoWell, it uses Firefox' PDF renderer - they just copied the code into the page itself.
- vvanders 10y agoFun tidbit is it seems the original reason behind this was Android support in WinPhone10 but when that was axed they migrated it to Ubuntu on desktop. If true that's a pretty nifty pivot.
- twblalock 10y agoI think it was called Project Astoria.
- satysin 10y agoIndeed, and the rumours are that Project Astoria worked too well which scared Microsoft. If Android apps "just worked" on Windows then why would developers bother using their new Universal Windows Platform.
- Amezarak 10y agoWhich is really unfortunate. I can't blame Microsoft for it, but the app-gap between WP/WinMo 10 and Android is getting untenable for me. I'm thinking about switching back, not because I think Android is better (I don't think it is at all), but simply because I'm starting to feel left out when all my family and friends are using, e.g., SnapChat to keep in touch and I...can't. It particularly riles me up that there were perfectly functional third-party Windows Phone Snapchat apps, but Snapchat demanded that they be removed and still (evidently) declined to make a WP app. Not to pick on Snapchat, it's not an uncommon story. If I could even just download the Snapchat APK and sideload it on my Windows phone, that'd be enough for me. But I can't, since Astoria got killed.
- wangchow 10y agoHonestly I use the app-gap as a feature. Not having the fluff is great because snapchat is making people illiterate. We went from real words to abbreviations to no words and minimal attention span. On the other hand now that Uber and bank of america have a universal app it feels more complete.
- 10y ago
- divyekapoor 10y agoExcellent preso. Thank you.
- allendoerfer 10y agoI wonder how much further humankind would have progressed by now if "because it can be done" were not such a big motivation for intelligent people. Edit: Since everybody took this post seriously, I will, too: We would be closer to some local maxima, but would have no chance to progress beyond them.
- d33 10y agoThey're doing this for entertainment purposes. You could burn out if you're not having fun while working. Perhaps one would just do dumber things, not ones that are more useful?
- jfoutz 10y agoI wonder how much further humankind would have progressed by now if we knew upfront what's useful and didn't have to try a whole bunch of crazy stuff.
- xufi 10y agoAgreed. and so for Windows I've had to deal with the pain of Cyngin and Putty and its bretheren which adds to the list of me trying crazy stuff when certain commands wont work. Then I remember "doh its Windows"
- mordocai 10y agoI would wager humankind would have progressed quite a bit less personally.
- stormbrew 10y agoThe only way it could possibly result in progressing more would be if perfect foresight were a thing. A lot of what we take for granted today was found/invented/etc. while looking at something else and finding an unexpected result.
- cmdrfred 10y agoThe biggest motivation for me is when people tell me that it can't be done.
- eatbitseveryday 10y agoI must complain the slides are chalk full of text with very few visuals. It becomes a paper reading instead of a talk at this point.
- vram22 10y agoMicrosoft has actually been doing Unix related stuff from way back - a fact that might not be known to some. Xenix, then SFU (Services For Unix - for interop - on Win NT or 2K), plus they had (part of?) a POSIX subsystem around then or earlier- I used it a bit for C utility dev work on WinNT), etc.
- whyenot 10y agoOf course Microsoft then licensed XENIX to the Santa Cruz Operation which after several years renamed it to SCO Unix. SCO eventually split apart, but the piece that ended up with SCO Unix renamed themselves the SCO Group. The SCO Group with (possibly indirect) financial backing from Microsoft, attempted to use XENIX in a number of copyright infringement lawsuits to attack Linux vendors.
- vram22 10y agoTrue. I read about parts of that history on Groklaw as those later events unfolded. For a while there, IIRC, based on what I was reading then, it looked like they might have nearly succeeded. Good that it didn't happen. IIRC, parts of the industry rose up together against it, also individuals. Don't know the full details.
- vram22 10y agoRefs.: https://en.m.wikipedia.org/wiki/Groklaw https://en.m.wikipedia.org/wiki/Groklaw https://en.m.wikipedia.org/wiki/SCO/Linux_controversies https://en.m.wikipedia.org/wiki/SCO/Linux_controversies https://en.m.wikipedia.org/wiki/Pamela_Jones https://en.m.wikipedia.org/wiki/Pamela_Jones " In 2010 the Electronic Frontier Foundation awarded the Pioneer award to "Pamela Jones and the Groklaw Website" for "Legal Blogging".[3] "
- kragen 10y agoHmm, there are a variety of inaccuracies in your short statement. Please carefully read the below so that you can be protected from propagating these errors in the future. · SCO Unix, although it incorporated some Xenix code, was very different from Xenix; it derived a lot from SVR4. · SCO basically went out of business, because their value proposition was "Unix, but on a regular PC so you don't have to buy an expensive RISC workstation." This stopped being a useful value proposition around 1997 because they couldn't keep up with Linux. So they sold the SCO Unix product line to Caldera, a Linux distributor, in 2001. I'm not 100% sure but I don't think any employees moved from SCO in Santa Cruz, California, to Caldera, which was in Utah. Maybe someone stuck around to smooth the transition? · Microsoft's backing of SCO was direct; they "bought a license" in 2003. Maybe they also did some indirect backing that I don't know about. · Caldera basically failed in the Linux distribution space in 2002, and the investors booted out CEO Ransom Love and replaced him with Darl McBride, formerly of Novell, IKON, a couple of startups, and Franklin Covey (!). · The copyright infringement lawsuits weren't based on Xenix. Nobody claimed Linux had copied from Xenix. Rather, they were based on Bell Labs Unix, from the 1970s, and AT&T Unix System Labs System V Unix. SCO had supposedly acquired the copyrights to these sometime in the 1990s, and in fact them giving permission is how the Lions book was legally republished in 1996 or 1997, but it turned out that in fact what they had acquired was not the copyright ownership, but a sublicenseable license to the copyright. The actual copyright rested with some company Novell had bought up at some point, so the lawsuit got thrown out of court. · The SCO Group sued not only Linux vendors, notably IBM, but also Linux users, notably AutoZone and DaimlerChrysler. This is an error of omission, but it's crucially important.
- RCortex 10y agoAnyone know if it's possible to somehow port the linux subsystem to windows 7 and 8?
- tracker1 10y agoNot likely, with Windows 8 pro, the latest docker for windows will probably be the closest thing to transparent integration. I tend to run a full Ubuntu Server VM, via SSH, in addition to local samba shares... I edit in a gui in windows, and run everything under linux. YMMV, but it's worked well enough for me. Now that docker has better integration, I may well start using that more often.
- wvenable 10y agoIf you look at the slides, it requires considerable kernel support. So that's very much a no.
- JonathonW 10y agoNo. The Linux subsystem is dependent on new kernel features introduced in Windows 10 (pico processes, which were introduced with 8.1 and improved in 10, improved fork support, file system case sensitivity improvements, memory management changes, etc.).
- iso-8859-1 10y agoHow has the fork support improved?
- tracker1 10y agoI can't help but think this is all towards an end which is Docker containers running on Azure's core infrastructure. Having the tooling show up earlier in Windows 10 as it's being flushed out is just a really nice bonus. I've been mostly using bash in windows (installed with git tooling) for a couple years now.
- jimsparkman 10y agoSo far, this has been fantastic. Our team has been seriously considering converting from Windows to Linux for embedded development. (we run Linux VM when needed) Up and running and cross compiling for ARM without issue. Really surprised how it has just worked so far. This came at a great time for us.
- Analemma_ 10y agoHeh, if you were just about to switch to Linux, then it sounds like it came at a great time for Microsoft too ;)
- frik 10y agoSo far it's been very bad for us. The always-on telemetry in Win10 draws a big question mark if we can depend on Windows in future. While Windows 7 is great and around until at least 2020, an expensive move to Linux, FreeBSD or Android seems like the better option.
- JdeBP 10y agoJust a suggestion: Consider PC-BSD alongside FreeBSD in your evaluations.
- stepik777 10y ago> always-on telemetry in Win10 When you install Windows 10 there are several pages of checkboxes where you can disable this telemetry. Of course we can never be sure that it is actually disabled.
- megaman821 10y agoIf you are trying to escape telemetry Linux or FreeBSD make sense, but not Android. Between the Android OS and the apps, Android collects much more data on you than Windows 10.
- breakingcups 10y agoThat doesn't seem related to the WSL at all.
- fapjacks 10y agoHonest question: What's the deal with this stuff? I'm not interested in the reasoning that it's done just because they can do it. I mean... Why not just ... use Linux? I suspect it's a comfort zone thing, and most people really don't want to move out of their comfort zone (and especially programmers have a hard time admitting this). I understand people developing for the platform, but I don't understand people developing for Linux on Windows. I hear some people talk about Visual Studio being a great IDE, but I know tons of people that don't use VS. They use ST3 on Windows to develop for Linux, and they're happy about this stuff, and I just don't understand why people wouldn't just migrate to Linux in the first place.
- willtim 10y agoUnfortunately Windows has much better hardware support (e.g. Skylake laptops, multi monitors via displayport MST).
- fapjacks 10y agoDoes it, though? I use four monitors with Linux Mint at work while my laptop is docked. The 'Optimus' dual-GPU thing works out of the box. But I have a Windows 10 gaming rig at home for Star Citizen, and when I installed Windows, it didn't recognize the onboard NIC or the AMD 9790 GPU with default drivers. And as it just so happens, late last night, this same Windows 10 box mysteriously lost network functionality, and I had to reinstall network protocol drivers (!). I hear "hardware support" a lot, but I haven't had problems with hardware support on Linux for a few years at least, and every time I try to use Windows, I have hardware problems. The Windows users on our dev team seem to have problems regularly. You're right that it used to be a thing. But I just don't buy it anymore.
- rodgerd 10y ago> Does it, though? Unless you live in a very special bubble, yes.
- witty_username 10y ago
- wernercd 10y agoObligatory: Maybe we finally have the year of Linux on the Desktop?
- andai 10y agoLink shortcut: https://raw.githubusercontent.com/ionescu007/lxss/master/The%20Linux%20kernel%20hidden%20inside%20windows%2010.pdf https://raw.githubusercontent.com/ionescu007/lxss/master/The...
- sandeep048 10y agoDirect link to the slides for the impatient> https://rawgit.com/ionescu007/lxss/master/The%20Linux%20kernel%20hidden%20inside%20windows%2010.pdf https://rawgit.com/ionescu007/lxss/master/The%20Linux%20kern...
- punnerud 10y agoOpen PDF on iPhone: https://raw.githubusercontent.com/ionescu007/lxss/master/The%20Linux%20kernel%20hidden%20inside%20windows%2010.pdf https://raw.githubusercontent.com/ionescu007/lxss/master/The...
- tobydweymouth 10y agoHow do we get linex
- fuzzfactor 10y agothis looks like it- http://www.walkingrandomly.com/?p=6187 http://www.walkingrandomly.com/?p=6187
- gdamjan1 10y agois there any more information on this custom init they are having?