Specifically, Bash on Windows is a developer tool. The idea here is that you’ve got some code that already works great on Linux that you’d like extend and hack on your Windows 10 machine. Or maybe you want to play with some Ruby gems that have some GNU utility dependencies. Drop into Bash, and have a field day.
It’s worth noting that this is not a platform for running or hosting production Linux workloads or server applications. It’s not for managing Windows Server workloads. Microsoft, the PowerShell Team, and the PowerShell community built extensive coverage for Windows, Windows Server, Active Directory, IIS, Exchange, SharePoint, System Center, SQL Server, Hyper-V, and Azure. In addition, we have a large partner ecosystem that supports PowerShell on both clients and servers, and this coverage is growing.
Of course, for those of us who love our developer workflows inside PowerShell, absolutely nothing will change. Bash and PowerShell are totally side-by-side. If you never type ‘bash’ in your console, literally zero will change for you as a PowerShell user.
Lastly, while Bash on Windows natively supports the Linux OpenSSH client, this complements our plans to deliver a native Win32 version of OpenSSH and to merge it upstream with the official OpenSSH repository. There are many advantages to having a Windows native SSH client, server, and toolchain, and we see huge value in supporting the official OpenSSH project in general. (In fact, you can check out our roadmap and progress on GitHub.)
We are incredibly excited about the plans we have for the future of PowerShell. PowerShell is a first-class scripting language, interactive console, remoting experience, and configuration management platform (DSC). Keep an eye on this space as we continue introducing new features, expanding our ecosystem, and growing our community. We welcome Bash on Windows as a fantastic addition to the Windows command-line ecosystem.
Joey Aiello
Program Manager, PowerShell
So I’m in both Windows and Linux multiple times daily, due to this Putty is my BFF. With that, I have some needs to marry Windows and Linux, more specifically get data from a Linux system into my PowerShell scripts. I ended up writing a module (PSSSH on GitHub) that allows me to create an SSH session as I would any object that allows me to get data, execute commands, etc.
Now I’ve also been playing with LXRun since I could get my hands on it and I will tell you, it’s awesome to not have to have Putty and PAgent always on my machine and running; it was a little difficult to get my ssh key working but that is due to lack of documentation.
I would absolutely love to see PowerShell on Linux, but as I do a lot of VMware administration I would then have to see the PowerCLI environment also have to be ported over, and with being able to get PowerShell and Linux playing nicely then no worries there.
Now LXrun isn’t perfect, but it’s lightyears ahead of where MS was a year ago, and really the major feedback I would have is the ability to integrate this into PowerShell directly. I could see that being a perfect way for an admin to really use Windows without having to have secondary Linux machines to log into for admin type stuff.
The only real feedback I would say beyond the integration is if X applications were able to run, and Docker containers inside the LXRun for development purposes.
Any idea how to use special chars like \,| and accented letters on this new bash? is breaking my head this problem
Let BASH come into windows,that is wrong!
Let PowerShell come into linux,is right!
microsoft open the door of the courtyard
,let BASH into yard.
hold back PowerShell goto linux house ,is wrong! wrong! wrong!
Linux can be managed by editing files, but on Windows you need to call APIs. Bash will never compete with PowerShell for management because it can’t edit the Registry, can’t do WMI, can’t manage Exchange or Azure and so forth. That’s why it’s regarded as a development environment on Windows.
This isn’t about
$ date
Sat, Apr 2, 2016 5:05:39 PM
vs.
PS C:\> get-date
Saturday, April 2, 2016 5:05:52 PM
This is about:
PS C:\> Get-Process apache
and then immediately dropping into bash for
$ ps ax | grep redis
If for example you were running a native Windows build of Apache against the Linux ELF build of Redis. Which is now totally possible.
I don’t quite understand. Aren’t you PowerShell guys not worried that Bash might eclipse the value of your efforts?
Nope.
1) We are focused on making our customer successful not in advancing a tool.
2) We started our journey by making the Unix tools available on Windows (SFU) and it didn’t help.
Bash on Windows is useful NOW because it is focused on making W10 be the best platform for OSS developers to develop OSS code.
If it turns out that Bash does a set of functions better than PowerShell does for Windows users – then that would be great feedback. We are always looking for our flaws and investing to fix them.
Jeffrey Snover[MSFT]
Well, thanks. This is the first time a Microsoft person speaks to me with confidence. 🙂
I’d like to go back and see what you did with SFU, but Microsoft has withdrawn the Windows 7 toolset from Download Center. Windows Vista version is still there, but … I am going need Windows Vista for that. But according to Wikipedia there was a Korn Shell and a C Shell there. What was wrong with them?
> We started our journey by making the Unix tools available on Windows (SFU) and it didn’t help.
This is literally the first time I heard about SFU and it sounds so much more awesome than this Ubuntu subsystem. Unix tools that _really_ run under Windows are much better than a virtual bash that cannot talk with Windows besides basic filesystem. I’m currently using the handful of tools that come with git (ls, ssh, grep, …) and now I read that SFU had 350 of them?!! This sounds awesome, what happened to it?
Felix,
Services for Unix or Subsystem for Unix Applications (SUA) which is what SFU was renamed to for Vista+ was actually pretty cool. It was based on Interix which was a more complete Posix subsystem for Windows to replace the Posix subsystem that originally shipped with Windows NT 3.1. Keep in mind SFU applications did not run in the Win32 subsystem — SFU and Win32 were peers.
All of the useful tools were ports provided by Interop Systems which is now basically defunct after Microsoft abandoned SFU. It was an incredibly useful environment which performed way better than Cygwin.
I, personally, was very disappointed when Microsoft deprecated SFU/SUA. In my not so humble opinion one of the biggest reasons for SFU’s failure was Microsoft’s almost complete lack of support and evangelism of the environment. It was also a time before Microsoft’s new found love of OSS.
Don’t get me wrong, I love PowerShell but I definitely think there was a need for something like SFU/SUA on Windows. If Microsoft can work out some basic interoperability between Bash and Windows that would be all the better.
If the syscall translation gets good enough that I can install BMC’s Network Shell (nsh) for Linux inside the Ubuntu layer I’ll be able to run native Linux tools on Windows rather than the really out of date Cygwin based versions of their tools.
Will SSH on Windows still suffer the same double hop problem PowerShell does on Windows? I’m aware this functionality is by design, and the ways to get around it, however it still ends up being a huge pain managing servers via PowerShell.
When will PowerShell support the || and && operators? Every shell i know of support them.
These operators make it really easy to create one liners with native commands.
& and | a reserved for other powershell functions. We have -and and -or.
Can i use -and/-or with native commands?
By native commands i mean windows console executables.
What’s wrong with the -and -or operators? Get-service | Where-Object {$_.name -eq ‘WinRM’ -and $_.status -eq ‘running’}
I said native commands. These are cmdlets.
Try to run “git stash && git pull && git push” on PowerShell and see what happens.
Use:
cmd /c “git stash && git pull && git push”
Yes please! And don’t forget the basic `<` that even cmd has. Have to use `cat … |` for everything which breaks encoding (UTF16 with BOM) and line endings (CRLF)! When you pipe an SQL script into mysql console, all special characters are broken.
I recommend PowerShell into. NET Core 1.0, and provides an open source version of the standard implementation.
Although more than called Pash the Mono implementation of PowerShell, but Pash with an official PowerShell gap is so big.
Pash Github: https://github.com/Pash-Project/Pash
If there is official support PowerShell open source version, I think PowerShell to get better
I think PowerShell should be transplanted into. NET Code 1.0. And providing open source version, community ported to Linux, BSD and other systems.
There is a Mono-based PowerShell open source implementation called Pash
https://github.com/Pash-Project/Pash
If there is official support PowerShell open source version, I think PowerShell to get better
Thanks.
Whoops! Thanks for the catch, Soner.
https://blogs.msdn.microsoft.com/powershell/2016/04/01/bash-for-windows-why-its-awesome-and-what-it-means-for-powershell/aka.ms/winbashann link seems broken. I strongly suspect you mean https://aka.ms/winbashann instead.