Most active commenters
  • matt_wulfeck(7)
  • whatever_dude(3)
  • criddell(3)

←back to thread

Ubuntu on Windows

(blog.dustinkirkland.com)
2049 points bpierre | 63 comments | | HN request time: 1.86s | source | bottom
1. matt_wulfeck ◴[] No.11391211[source]
microsoft is leveraging FOSS Linux to get Mac users. I think it's a real smart move.

The author points to using grep and Xargs and some other tools to quickly update a package. That's the key here. These bash/Linux utilities are productivy boosters for all the Linux and Mac/bsd people out there. I can't imagine living without them and they're necessary for any system I develop on (which is currently a Mac).

replies(6): >>11391411 #>>11391451 #>>11391515 #>>11392124 #>>11392170 #>>11393505 #
2. simonlc ◴[] No.11391411[source]
I completely agree. I only really switched to OSX because getting node tools to work on windows and cygwin is a pita.
replies(2): >>11391709 #>>11392450 #
3. whatever_dude ◴[] No.11391451[source]
I agree. I'm (mostly) a Windows user, and the one reason I'm constantly thinking of moving to OSX as my primary OS is the amount of command-line tooling that is available in the system. Everything new is always there first. I've started feeling that I was holding back by staying on Windows, even if using Mingw daily.

This might be the thing that saves Windows as a dev machine for me. I'm a heavy cmd/powershell user but I'd migrate to bash in an instant.

replies(2): >>11391521 #>>11393105 #
4. tetraodonpuffer ◴[] No.11391515[source]
this, so many people that develop OSS do so on mac laptops because it's so easy to get the toolchain working, with real linux binaries in windows it's making the value proposition of the surface book a lot stronger for developers.
5. avtar ◴[] No.11391521[source]
> I'm constantly thinking of moving to OSX as my primary OS is the amount of command-line tooling that is available in the system. Everything new is always there first.

Having had OS X, Windows, and various Linux distributions as my primary operating systems I would consider having an Arch Linux VM kicking around if you want all the packages in the world, maintained fairly well.

replies(1): >>11393243 #
6. tostitos1979 ◴[] No.11391709[source]
I've been "stuck" with a 2010 Macbook since Apple isn't refreshing it's laptop hardware soon enough. Plus I'm sick of soldered in RAM and other BS.

For devs that do heavy Linux work (but have stuck with a Mac OS for GUI/app reasons), is it time to move (back) to Windows? If so, what would be a good laptop to get at the moment?

replies(7): >>11391787 #>>11391803 #>>11391857 #>>11392064 #>>11392420 #>>11393251 #>>11394878 #
7. snuxoll ◴[] No.11391787{3}[source]
Dell's Inspiron line is my go-to for portable workstations. Run Linux straight on them, or if GNOME/KDE aren't your cup of tea just run Windows and put your distro of choice in a VM (I just run Fedora on everything but my gaming PC, personally).

I'm personally using a Dell XPS 13 (2014), soldered in RAM, but I did buy an ultraportable and 8GB is more than sufficient to do my all my personal work on. Work supplied me with a Lenovo W540 that is substantially more flexible, but it weighs as much as a couple bricks and I usually just leave it at home on the dock.

replies(1): >>11392023 #
8. matt_wulfeck ◴[] No.11391803{3}[source]
I would say no, especially if your mac had an i7 and reasonable amounts of ram.
9. x1798DE ◴[] No.11391857{3}[source]
Why not move to Linux?
replies(1): >>11391950 #
10. matt_wulfeck ◴[] No.11391950{4}[source]
Just out of curiosity, what does a Linux desktop offer that's not also natively offered in Mac and also highly polished?

Every year I try a switch to Linux desktop. This year I made it as far as trying to get multiple monitors working well. I also dabbed in gaming. In the end I went back to my work=Mac game=Windows duopoly.

replies(5): >>11392134 #>>11393355 #>>11393718 #>>11394991 #>>11401124 #
11. jpalomaki ◴[] No.11392023{4}[source]
I don't have hands on experience, but Dell XPS 15 looks like an interesting option for thoaw looking for Windows laptop that is close to 15" Macbook Pro (quad core, sleek etc).
replies(1): >>11392695 #
12. sixothree ◴[] No.11392064{3}[source]
Thinkpad T460s. I have the T450s and like it plenty. It's definitely up there with macbook build quality.
replies(1): >>11392346 #
13. samstave ◴[] No.11392124[source]
Its actually kind of interesting that we dont have a literal "standard base" of tools that any OS should supply.

(unless I am missing something)

But it would make sense that certain things should be doable on literally any computer. grep, find, vi, edit, etc... etc... I cant come up with a complete list - but it would be great to start that direction.

replies(2): >>11393375 #>>11395244 #
14. toyg ◴[] No.11392134{5}[source]
Some tools (docker etc) are typically borne on linux and later (not always) ported to OsX. Nothing you cannot get around with a bit of emulation, of course, but it can be painful at times.

The whole python ecosystem is also better on Linux overall.

Anything strictly desktop-oriented is better on OSX of course.

15. stcredzero ◴[] No.11392170[source]
microsoft is leveraging FOSS Linux to get Mac users. I think it's a real smart move.

Apple leveraged a form of BSD -nix to get developer mindshare. Now Microsoft is leveraging FOSS Linux to leapfrog Apple. It is a smart move. While OS X isn't bad for -nix-like development, it still involves jumping through hoops and compromises. (Homebrew/Macports)

replies(1): >>11393144 #
16. meddlepal ◴[] No.11392346{4}[source]
The T540p isn't though. I hate mine.
replies(1): >>11392956 #
17. leshow ◴[] No.11392420{3}[source]
why not just stay on linux
18. skrebbel ◴[] No.11392450[source]
Wait, getting node to work on windows is a pita?

I know of no language runtime and ecosystem that has better cross-platform support than Node (hm ok maybe Java also). I develop solely on Windows (I just like it better) and virtually all of NPM just works on my box. Even stuff people never tested elsewhere than on their Macs, it just works. Express, webpack, mocha, phantomjs, it's really quite impressive if you ask me.

replies(3): >>11392664 #>>11393515 #>>11394316 #
19. itsananderson ◴[] No.11392664{3}[source]
99% of the painful Node stuff on Windows comes down to native packages. To even compile, you have to install Visual Studio. Then you have to hope the module developer has a build definition that even works for Windows.
replies(1): >>11395824 #
20. NateDad ◴[] No.11392695{5}[source]
I have the XPS 15. It is almost identical to a Macbook Pro. Build quality is really awesome. Super super happy with it. The new one with the infinity edge screen is super friggin' sexy, and will absolutely be my next computer. I know a bunch of other devs on the XPS 15 as well, also very happy (we run Ubuntu, but I'm sure it's even better in Windows).
replies(1): >>11395024 #
21. criddell ◴[] No.11392956{5}[source]
I have a ThinkPad Yoga and an older ThinkPad T520. Both are pretty awful machines. Plus I really don't trust Lenovo anymore.

If I were buying a Windows machine, the only one I would consider is the Microsoft Surface Book.

replies(1): >>11393646 #
22. swah ◴[] No.11393105[source]
Me too - but why not a Linux VM or a VPS? Its mostly for textual usage, no?

(My own answer is that cheap VPSes are 150ms away from me, and with Virtualbox I had a few problems, always related to Windows file permissions yada yada yada...)

replies(2): >>11393274 #>>11393369 #
23. zxcvcxz ◴[] No.11393144[source]
I believe there will be many hoops to jump through to use this as a development environment too, and the limitations of this ABI will be plenty.
replies(1): >>11393335 #
24. whatever_dude ◴[] No.11393243{3}[source]
I've done so in the past, but it becomes cumbersome to manage shared folders. The ability to have everything shared and your driver naturally working under /mnt/ - essentially replacing cmd with bash and its tools - is a big deal for me. Using editing/managing/design tools in Windows build with a build/deploy system in bash, and no middle man... that'd be the day.
replies(1): >>11394707 #
25. zeveb ◴[] No.11393251{3}[source]
> For devs that do heavy Linux work (but have stuck with a Mac OS for GUI/app reasons), is it time to move (back) to Windows?

Why not just use Linux? It has a GUI. It has apps. It does everything a modern desktop or laptop needs to do. It really is great.

replies(3): >>11395194 #>>11400934 #>>11417562 #
26. whatever_dude ◴[] No.11393274{3}[source]
Same. At some point managing permissions and sharing and VMs just becomes a pain. If I can just drop to bash and access my file system... that's all I need/want.
27. matt_wulfeck ◴[] No.11393335{3}[source]
The thing I'm wondering is how it will handle launching daemons. It doesn't look like there's systemd or upstart integration, and without something like screen it quickly becomes a hot mess.
replies(1): >>11416376 #
28. zeveb ◴[] No.11393355{5}[source]
> Just out of curiosity, what does a Linux desktop offer that's not also natively offered in Mac and also highly polished?

A GNU userland. A plethora of tiling window managers. A selection of clean terminals. Every single thing Debian's or Arch's repos offer which one must turn to brew for.

And of course there's freedom too, which is nice.

> Every year I try a switch to Linux desktop. This year I made it as far as trying to get multiple monitors working well.

I've got multiple monitors running on Linux, over HDMI, at home & at work, at differing resolutions & orientations. I use arandr-configured xrandr scripts which set my desired orientation with a quick keystroke in my window manager. What more does one need?

replies(1): >>11393729 #
29. matt_wulfeck ◴[] No.11393369{3}[source]
150ms sucks when you're working with multi GB files and packages. Also network security is not ideal.

Nothing beats running and developing on localhost.

30. matt_wulfeck ◴[] No.11393375[source]
I would argue that gnu coreutils is this base. Available on al *Nix OS, including Mac.
replies(1): >>11395239 #
31. micahbright ◴[] No.11393505[source]
Of course Mac Users think it's about them - everything is about them.
32. hatsix ◴[] No.11393515{3}[source]
Windows Path issues and compiling native code. Between those two things, nearly everything I've ever tried on windows has failed.
33. peternicky ◴[] No.11393646{6}[source]
why don't you trust Lenovo?
replies(2): >>11393846 #>>11393907 #
34. bigger_cheese ◴[] No.11393718{5}[source]
In my own experience Linux has the following Advantages over OS X these are of course subjective:

Better Desktop environment Better Package Management More Up to date packages

Some of my knowledge of OS X is likely outdated I haven't used it since 2011

I started using Linux when I was at University late 90's early 00's (Mandrake was my first distro). I switched to OS X around 2005 and used it as my primary operating system for about 5 years.

I used OS X because I'd purchased a MacBook Pro (mostly for the hardware) I still think Macbooks are the nicest laptops I've used to this day I went through 3 iterations of Macbooks before I stopped using OS X. I used OS X because it was good enough but I never fell in love with it.

I absolutely hated the desktop environment, silly things like no ability to customise anything, lack of workspaces, having to hit command q to kill application (because the 'x' button wouldn't close them properly) stuff like that. Workspaces came in a later OS X update which addressed some of my gripes.

It was never easy to install third party packages and libraries in OS X. I think this has improved now, when I used OS X it it was a mess (especially compared to the ease of something like apt). The native system packages were always really ancient - old version of GCC, old version of emacs, python etc. Trying to install newer version of these 'default' packages was not straightforward at all I remember having huge issues getting python 3 working.

Nowadays I run Fedora very happy with it. Not compelled at all to switch back. Linux support for modern laptops is a lot better than it was when I first started using Macs.

My current job is in an 'enterprisey' environment I'm forced to use a locked down version of windows here. Almost anything would be better.

35. matt_wulfeck ◴[] No.11393729{6}[source]
Maybe HDMI is better supported that DisplayPort.
replies(1): >>11393952 #
36. jjawssd ◴[] No.11393846{7}[source]
bad build quality. also had issues with humming and generally falling apart in subtle ways while macbooks never do.
replies(1): >>11394640 #
37. r3bl ◴[] No.11393907{7}[source]
I'm pretty sure that the answer comes down to one word: Superfish.

Although, in my opinion, I wouldn't trust any laptop hardware company out there enough to use the system that came pre-installed with it, but that's for another discussion.

replies(1): >>11394358 #
38. diyorgasms ◴[] No.11393952{7}[source]
I've got monitors daisy chained using displayport on Debian, in mixed portrait and landscape modes. This is using an NVIDIA card and GNOME. It was plug-and-play.
replies(1): >>11396238 #
39. girvo ◴[] No.11394316{3}[source]
node-gyp, though. In my experience, it's the native packages that cause problems, which is honestly to be expected because building a native library for Node to bind to in a cross-platform way is always going to be somewhat painful.
40. criddell ◴[] No.11394358{8}[source]
There has been a string of things, including Superfish.

There was also the Lenovo Solution Center problem. And the Lenovo BIOS shenanigans (or was it the Lenovo Service Engine?).

There have just been too many lapses in judgement at Lenovo. Either their competence is slipping or their ethics are. Either way, I'm done with them for now.

41. meddlepal ◴[] No.11394640{8}[source]
Lots of cheap plastic. I don't love Apple products but the build quality of their products makes PC vendor laptops and desktops look really bad.
replies(1): >>11395651 #
42. Scarbutt ◴[] No.11394707{4}[source]
You don't use shared folders with your linux VM, you ssh to it, and use tmux/(vim|emacs) ;)
43. deckar01 ◴[] No.11394878{3}[source]
Go to a brick and mortar electronics store, pick out a laptop that meets your desired specs, and do something realistic with it for a while. There are lots of little things I took for granted about Apple MacBooks that no Windows laptops could match. Touch pad, high dpi display, and cooling were never quite done right, but they are crucial for every day operations.
replies(2): >>11395170 #>>11395617 #
44. cyphar ◴[] No.11394991{5}[source]
> Just out of curiosity, what does a Linux desktop offer that's not also natively offered in Mac and also highly polished?

Freedom, a full GNU userland, proper package management of the entire system, plethora of CLI programs which can fulfil your every need and only really work on GNU/Linux, configurable, etc.

> Every year I try a switch to Linux desktop. This year I made it as far as trying to get multiple monitors working well. I also dabbed in gaming. In the end I went back to my work=Mac game=Windows duopoly.

I use multiple monitors every day for my work under OpenSUSE and Arch. They both worked with either minimal (Arch) or no (SUSE) configuration. I use DisplayPort which works pretty well.

replies(1): >>11395979 #
45. Pwngea ◴[] No.11395024{6}[source]
Which one do you have? How is it specs-wise?
replies(1): >>11397565 #
46. cheapsteak ◴[] No.11395170{4}[source]
I'm with you on the touch pad, three-finger touch-drag in particular is something I've not found a PC do well; my PCs' scroll simulated scroll momentum is also buggy (scroll, stop scrolling, Ctrl+click to open new tab, messes up the font size instead because it's still stimulating mouse wheel movement)

I'm surprised to hear someone preferring macbooks cooling though, my macbook always gets so hot relative to other laptops

47. trill1 ◴[] No.11395194{4}[source]
Right! This whole thread has me scratching my head.

Not long ago Microsoft schemed to stomp out Linux and now they've had a change of heart? Fuck Microsoft! To this day even they engage in anti-competitive bundling with OEMs, not to mention their seedy history in relation to open source.

48. umanwizard ◴[] No.11395239{3}[source]
OS X definitely doesn't ship with gnu coreutils. Sure, it's possible to install them manually.

Also, why gnu and not bsd? OS X's find, grep, sed, and so on work fine for me and are not gnu.

49. umanwizard ◴[] No.11395244[source]
We have exactly what you're talking about. It's called POSIX.

"The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems." (https://en.wikipedia.org/wiki/POSIX)

50. willtim ◴[] No.11395617{4}[source]
I would suggest not trying to source quality hardware from an electronics store. For software development, Thinkpads more then compete with MacBooks, the keyboard is considerably better too.
replies(1): >>11396334 #
51. se6 ◴[] No.11395651{9}[source]
I prefer a great deal plastic to environmental foe aluminium. To me their use of aluminium is a very good reason not to buy Apple hardware. I have a Dell M3800 right now, and the build quality is very good. Thin, light, excellent 4K touch screen, good battery life, I easily added a second HDD to it. Not to mention that every thing works perfectly well under Linux.
replies(1): >>11396962 #
52. edwinyzh ◴[] No.11395824{4}[source]
Correct! The last time I wanted to npm-install a CLI but it needs gyp, I'm not familiar with the node thingy and I gave up after several failed attemps including installing the VC++ runtime, Python, etc....
53. tychuz ◴[] No.11395979{6}[source]
>Freedom People are not interested.
replies(1): >>11403801 #
54. willtim ◴[] No.11396238{8}[source]
That's great that it works for you. But for Skylake hardware, Displayport MST is completely broken and Intel have no plans to fix. The major players simply are not heavily investing in desktop linux, leaving the community to try and fill the gaps.
55. deckar01 ◴[] No.11396334{5}[source]
I just meant electronics stores have display models you can try before buying. I think my local stores carry Thinkpads, maybe they were IdeaPads.
56. criddell ◴[] No.11396962{10}[source]
> good battery life

What? The M3800 had terrible battery life under Windows and it was even worse under Linux.

57. NateDad ◴[] No.11397565{7}[source]
I have one that is now 2.5 years old. Specs-wise, it was basically top of the line. Quad Core i7, 16GB RAM, 500GB SSD, 3200x1800 touchscreen, GeForce 750m GPU (which was one of the best mobile GPUs back then). It has a lot of nice touches that lower end models don't have, like 2 or 3 USB3 ports, with 2 or 3 USB ports that have power even when the laptop is off (super handy for charging a phone on an airplane while your laptop is still in your bag, for example). Wireless N networking, HDMI and MiniDP connections, able to drive two external monitors at once along with the laptop screen (up to 1920x1200 over HDMI and 4k over miniDP). The touchpad is pretty decent. backlit chicklet keyboard with variable brightness. SD card slot, 1/4" headset port... the only thing it's missing is an ethernet port, but that's just because it's too thin for the port. A USB3 gigabit ethernet adapter is cheap and works great.

And it's pretty damn light for a 15" laptop. Easily one-handable (I think it's like 2 pounds IIRC).

And what's great is that you can crack it open and replace stuff - I swapped out the hard drive and replaced a malfunctioning battery myself with just a torx screw driver (super tiny torx, but still, no glue or special tools or anything).

It was pretty expensive - like $1900 IIRC. You're paying for the high res screen, better build quality, and thinness/lightness. But it's still like $500+ less than an equivalent macbook.

replies(1): >>11406624 #
58. khattam ◴[] No.11400934{4}[source]
>Why not just use Linux?

I would LOVE to ditch OS X and run Linux on it, only problem is NO DISTRO supports latest hardware. There are always things that don't work and it gets tiring.

I tried to run Ubuntu on my old Dell Laptop... there would always be some issues related to graphics card, wifi or some shit, overheating, battery drain... or something not working. At the end, had to go for Windows with Ubuntu on vagrant boxes and Desktop Ubuntu in Virtualbox.

Then on my new Macbook Pro, I wanted to run Ubuntu 14.04... but of course, so many things don't work... like right clicking on the touch pad, WiFi or such simplest of features you'd expect to be supported in such widely available and pretty standard hardware... but NOPE. So, it's vagrant and Virtualbox running mostly Ubuntu on OS X again. I am actually considering installing Windows and running Linux on a VM inside it.

59. khattam ◴[] No.11401124{5}[source]
>Just out of curiosity, what does a Linux desktop offer that's not also natively offered in Mac and also highly polished?

I use Mac OS X and this is what I miss about Linux:

- Clean package/software management and updates.

- Basic customizability without having to install 3rd party binaries from untrusted sources

- Multiple filesystem support (NTFS write not supported out of the box... needing 3rd party software... ext support has to be compiled, breaks with updates... generally PITA)

- Easy installation of software/libraries from source (generally PITA to set up toolchain to compile general cross platform open source software)

- Proper desktop environment (the one that OS X has is shit compared to Gnome)

- Proper file manager (the one that OS X has is shit compared to Nautilus)

- Up to date and standard command-line tools (The ones in OS X are old... for example check the version of unzip... they can't unpack zip files created by new zip tool)

- Better command line system wide file search (I love mlocate, the one in OS X is shit)

- Ability to run docker natively

60. cyphar ◴[] No.11403801{7}[source]
I am a person, therefore a subset of people. I am interested. QED. Not to mention that that wasn't the only thing I mentioned, it was just the first because it's the most important.
61. Pwngea ◴[] No.11406624{8}[source]
Wow, sounds awesome. Was thinking about getting a macbook but probably won't anymore.
62. JdeBP ◴[] No.11416376{4}[source]
It is, quite simply, not aimed at launching daemons in the first place.

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

* https://blogs.windows.com/buildingapps/2016/03/30/run-bash-o...

I strongly suspect that you will never see systemd working on the Windows NT kernel. Getting systemd to work doesn't just involve supporting the Linux kernel system calls, but also involves getting what those system calls do to work as well. It's all very well supporting open(2), but if one cannot open (say) /proc/self/mountinfo or all of the stuff under /sys or many other things (some listed at http://0pointer.de/blog/projects/the-biggest-myths.html), then systemd might load but it won't run and work.

The same goes for upstart. For example: upstart uses pseudo-terminals for logging. The Windows NT Linux subsystem, according to the Microsoft demo video, doesn't implement pseudo-terminals and returns ENOENT when a program attempts to obtain one.

* http://upstart.ubuntu.com/cookbook/#console

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

Then there's the fact that the Windows NT Linux subsystem doesn't run Linux programs as the first process in the entire system. That honour goes, of course, to Windows NT's own Session Manager. Both systemd and upstart have "Am I process #1?" checks, and operate in a non-system mode if they aren't process #1.

Which brings us on to the fact that Windows NT already has a mechanism for launching daemons. It already has a Service Control Manager that supervises daemons and that talks LPC to control utilities. It already has a Session Manager that handles initialization, shutdown, and sessions. Ironically, it has had some of the things that are "new" in systemd for roughly a quarter of a century. (But some of those "new" things aren't even new in the Linux and Unix worlds, really.)

It's worth observing that the approach taken by the old Windows NT POSIX subsystem (the Interix-derived SFU/SFUA one) is to run daemons under Windows NT's own Service Control Manager. There is a small shim (psxrun.exe) for ensuring that the Service Manager could run and control the POSIX program, doco on what environment a POSIX program should expect when run under the Service Manager, and an Interix version of the service(1) command that understands Windows NT service management and how to speak to it.

* https://technet.microsoft.com/en-us/library/bb463219.aspx#EH...

* http://systemmanager.ru/svcsunix.en/extfile/portapps/service...

It would be interesting to see how some of the daemontools family of service management toolsets -- such as nosh, runit, perp, daemontools-encore, and s6 -- fared on the Windows NT Linux subsystem. I suspect that one would trip over unexpected holes in the Windows NT Linux subsystem (like setuidgid not working because the underlying system calls return EPERM, perhaps). But I also suspect for several reasons that quite a lot would work. The daemontools family uses FIFOs and ordinary files as the control/status API; is composable and loosely coupled and so doesn't lock everything in to Linux-specific stuff (like specific files in /proc, /dev, or /sys) even if one tool in a toolset might need such stuff and permits that one tool to be replaced or otherwise worked around; and can do service management without demanding to be process #1.

So one could spin up svscan, or service-manager, or perpd, or runsvdir; stub out or comment out invocations of setuidgid or runuid with a dummy program if the Windows NT Linux subsystem didn't support that; similarly stub out or comment out invocations of jexec (for nosh service bundles that use BSD jails) and whatever of ionice, chrt, and numactl (for nosh service bundles that use those) don't work; and probably get quite far.

But the big deal would be spinning service management up outwith a Windows NT login session, so that daemons are actually daemonized. The old Windows NT POSIX subsystem actually has an init process (and an inetd) that can spin up other stuff. I strongly doubt, given the very clearly stated aims, that the new Windows NT Linux subsystem has (or will have) anything similar.

63. JdeBP ◴[] No.11417562{4}[source]
With UbuntuBSD (https://news.ycombinator.com/item?id=11326681) the equivalent question is "Why not just use PC-BSD?"