• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

bash and other Linux command line utiltiies coming to Windows 10

Status
Not open for further replies.

XiaNaphryz

LATIN, MATRIPEDICABUS, DO YOU SPEAK IT
http://arstechnica.com/information-...-and-linux-command-line-coming-to-windows-10/

Microsoft saying that the Windows 10 Anniversary Update will include the ability to run the popular bash shell from Unix, along with the rest of a typical Unix command-line environment.

We're still trying to get the inside story on what Microsoft has done here, but what we've known for several months now is that the company has developed some Windows kernel components (lxcore.sys, lxss.sys, presumably standing for "Linux core" and "Linux subsystem," respectively) that support the major Linux kernel APIs. These components are not GPLed and do not appear to contain Linux code themselves; instead, they implement the Linux kernel API using the native Windows NT API that the Windows kernel provides. Microsoft is calling this the "Windows Subsystem for Linux" (WSL).

A kernel API is one thing, but to be useful you need user mode applications. For Astoria, this would have been a version of the Android Open Source Project, Google's mostly BSD-licensed code that provides a Java-like runtime and various applications and system services. For WSL, however, Microsoft is turning to Canonical, creators of Ubuntu, for help. Canonical has provided a system image containing the Ubuntu versions of the various command-line tools that are typically found in a Linux distribution.

Our understanding is that these are not recompiled or ported versions of the programs (as are used in tools aiming to provide a Unix-like environment on Windows such as Cygwin) but instead unmodified programs. Microsoft is describing this in terms of providing a Linux-like command-line environment at the moment, but from what we can gather, there's little fundamental restriction to this, potentially opening the door to running a wide range of Linux programs natively on Windows.
 
When people talk about ___ year being the year of Linux I don't think they quite envisioned this. That's really cool though.
 
Doubt it'll run much Linux software all that smoothly but it would be awesome to have curl and ls work

(I use GitHub Shell for that currently)

In general: good on MS for chipping away at the walled garden.
 
Doubt it'll run much Linux software all that smoothly but it would be awesome to have curl and ls work

The early word is that there is a negligible performance difference. It's not a VM or simulated. It's running native ubuntu libraries.

As someone stuck in a windows dev environment at work this is pretty awesome.
 

XiaNaphryz

LATIN, MATRIPEDICABUS, DO YOU SPEAK IT
Doubt it'll run much Linux software all that smoothly but it would be awesome to have curl and ls work

(I use GitHub Shell for that currently)

In general: good on MS for chipping away at the walled garden.

I think you can use curl in Powershell but it requires a bit of tweaking to get it to work as expected.
 
Can't really remember the last time Microsoft did something this cool for Windows.

Of course bash will only be useful to install zsh ;)
 

Jonnax

Member
Microsoft really seeing the rise of the web and how a lot of developers are moving to OSX.

Good to see this.
 

riotous

Banned
Nice, I usually grab Git Bash for this, glad they're finally coming around.

Well they've gone the other direction for around 15 years; .Net has always been open enough to allow for Mono to exist on Linux.

This is definitely a bigger step; but if anything it's more self-serving not less self-serving than allowing their framework to run on Linux; especially since you've never been forced to use Visual Studio to code .Net.
 

Zaph

Member
Best news from Microsoft in years

Sounds like a company intent on locking down the PC.
It's clear as day to anyone who's been paying attention to their habits over the last couple decades that MS is opening up to attract developers in order to bolster their wider ecosystem and slowly closing things down on the consumer end to lock them into that ecosystem.
 

h1nch

Member
Curious who's going to maintain packages for this new shell environment. They mention that you can install stuff via apt, but who would ultimately be the gate keeper for the package repos, Canonical or Microsoft? And can you change the mirrors you point to?

This could have some interesting security implications given Windows' history as a prime target for malware makers.
 
So for those of us who only rarely touched linux, how would having a bash shell implemented in W10 be good and useful? I'm genuinely curious to know what the niche is that bash fills that isn't already filled by cmd and powershell. I'm still learning powershell and have written a script or two, and I've used cmd since the days of DOS 3.3, but I've only screwed around with linux in a VM and using raspian, so I'm not really familiar with all the ins and outs of bash.

I know people can be sensitive about their favorite programs, so I'm not trying to start anything, I just want to learn.
 

emb

Member
Nice!

I don't think it'll be too revolutionary, but it's convenient and a great gesture to see. Showing some nice attention to devs.
 
Curious who's going to maintain packages for this new shell environment. They mention that you can install stuff via apt, but who would ultimately be the gate keeper for the package repos, Canonical or Microsoft? And can you change the mirrors you point to?

This could have some interesting security implications given Windows' history as a prime target for malware makers.

From what I understand it's just the regular Ubuntu distribution and therefore Canonical's package repositories, too. For example here they talk about 14.04 LTS specifically, and I don't think they'd be using that name if it was some sort of custom thing.
Windows has had IPC via pipes for a while, so I'm not surprised they finally decided to get their own UNIX-like CLI. That MS chose to port straight-up bash is cool, though.

The far more interesting part to me is that MS is trying to achieve binary compatibility with Linux applications. Adding in libraries emulating the Linux system calls to run "unmodified programs" isn't enough though, as that still requires recompiling the application to link against said libraries. Not sure if or how MS will get around that- some older OSes solved this problem, but the solutions there aren't likely the best for Windows.
It's not a port. It's the Ubuntu binary running on Windows. Think Wine but the other way around.
 
Windows has had IPC via pipes for a while, so I'm not surprised they finally decided to get their own UNIX-like CLI. That MS chose to port straight-up bash is cool, though.

The far more interesting part to me is that MS is trying to achieve binary compatibility with Linux applications. Adding in libraries emulating the Linux system calls to run "unmodified programs" isn't enough though, as that still requires recompiling the application to link against said libraries. Not sure if or how MS will get around that- some older OSes solved this problem, but the solutions there aren't likely the best for Windows.
 
Curious who's going to maintain packages for this new shell environment. They mention that you can install stuff via apt, but who would ultimately be the gate keeper for the package repos, Canonical or Microsoft? And can you change the mirrors you point to?

This could have some interesting security implications given Windows' history as a prime target for malware makers.

You're using the same binaries that Ubuntu users use in Canonical's repos, and there's no reason you can't configure apt to grab from other repos.

As for security-the bash shell runs in userspace and it's something that you choose to install. Malware makers are surely going to see more success through other vectors than this.

So for those of us who only rarely touched linux, how would having a bash shell implemented in W10 be good and useful? I'm genuinely curious to know what the niche is that bash fills that isn't already filled by cmd and powershell. I'm still learning powershell and have written a script or two, and I've used cmd since the days of DOS 3.3, but I've only screwed around with linux in a VM and using raspian, so I'm not really familiar with all the ins and outs of bash.

For developers, a lot of content is written targeting the bash user running on Linux. Windows developers don't have to look at that content and go "not for me" or try to translate each command into something appropriate (if any) for their own command line.

Really the big deal isn't as much bash as it is binary compatibility with ubuntu's apt-get repos. Now if you want to follow a cool guide someone posted on medium and linked in through Hacker News, you can just fire up your bash shell and go ham.
 
So for those of us who only rarely touched linux, how would having a bash shell implemented in W10 be good and useful? I'm genuinely curious to know what the niche is that bash fills that isn't already filled by cmd and powershell. I'm still learning powershell and have written a script or two, and I've used cmd since the days of DOS 3.3, but I've only screwed around with linux in a VM and using raspian, so I'm not really familiar with all the ins and outs of bash.

I know people can be sensitive about their favorite programs, so I'm not trying to start anything, I just want to learn.

For me, it's about cross platform parity. Often times when I'm doing development, doing something on the command line in Linux and OSX is more or less the same, but it's totally different when you're on Windows. You're usually told to install cygwin but man does that become a pain in the ass.
 
For me, it's about cross platform parity. Often times when I'm doing development, doing something on the command line in Linux and OSX is more or less the same, but it's totally different when you're on Windows. You're usually told to install cygwin but man does that become a pain in the ass.

Ahhh, okay. So it's more of a development environment thing? That makes sense. Should be good stuff. I guess it isn't super relevant to my workflow on an all windows network, since I spend a lot of my time remoted into a windows server, working in AD and in powershell. But this makes sense that it'd be a huge get to be able to work with git without installing anything else.

Aw man, all our devs are going to want to upgrade from Win7 this summer, I bet...
 
What a timely post. I was just exploring my windows bash-like options today as I may need to transfer from Ubuntu/OSX to Windows (shudder) for development.
 
Anyone have any idea if this will have repercussion for file system support? The variety of FS available on Linux dwarfs Windows and some of them are nice.
 

Kinitari

Black Canada Mafia
Can't really remember the last time Microsoft did something this cool for Windows.

Of course bash will only be useful to install zsh ;)

At work someone today was talking about fish instead of zsh. There's always some new hotness! But I don't want to have to deal with porting over all my git alias's.
 

aeolist

Banned
If I had to guess they are probably leveraging their work they've done for Azure.

apparently it's part of the project astoria tech they developed for running android apps under UWP. they had to have linux compatibility as part of that.
 

Pokemaniac

Member
I've been using git bash on windows for a while now, but an actual Linux subsystem would be really nice for development. Hopefully it's better supported than the old Unix subsystem.
 

MartyStu

Member
I wish that Red Hat been the partner, but I will take what I can get.

The only Windows machines on our network are our DCs and it would be great if working on them were more bearable.
 
Status
Not open for further replies.
Top Bottom