We can use bash in our scripts now in Win10

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
jfl
Posts: 226
Joined: 26 Oct 2012 06:40
Location: Saint Hilaire du Touvet, France
Contact:

Re: We can use bash in our scripts now in Win10

#16 Post by jfl » 19 Oct 2016 14:57

Why would they not account for this in the version of BASH they are using on Windows.

Because Microsoft just provides the Linux-compatible kernel. Everything else is just plain unmodified Ubuntu applications, including bash.
This is the beauty of it: You can install any Ubuntu package, and be sure that any updated package will work.

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: We can use bash in our scripts now in Win10

#17 Post by Squashman » 19 Oct 2016 15:01

jfl wrote:
Why would they not account for this in the version of BASH they are using on Windows.

Because Microsoft just provides the Linux-compatible kernel. Everything else is just plain unmodified Ubuntu applications, including bash.
This is the beauty of it: You can install any Ubuntu package, and be sure that any updated package will work.

So the Linux subsystem is more then just having BASH on your computer? You can run any linux program within it?

I installed the update a few weeks ago because I wanted to use it. I used to be a Unix admin 10 years ago. But when I installed the Windows Anniversary update it broke Quick Books so I had to roll back until my wife decides to update Quick Books to the latest version.

jfl
Posts: 226
Joined: 26 Oct 2012 06:40
Location: Saint Hilaire du Touvet, France
Contact:

Re: We can use bash in our scripts now in Win10

#18 Post by jfl » 20 Oct 2016 01:28

Squashman wrote:You can run any linux program within it?

Any text-mode program. GUI programs are not yet supported, and I don't know if they ever will.
By default, they install just the bare minimum set of shell tools that Posix requires.
Then you can use the apt-get package manager to get the rest from Ubuntu repositories. This opens up huge possibilities.
For example I started by installing gcc, make, etc. Apt-get has a predefined target that groups all common development tools:

Code: Select all

apt-get install build-essential

And I now have a fully functional Linux build tool chain within Windows 10. No more need for VMs or Cygwin.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: We can use bash in our scripts now in Win10

#19 Post by foxidrive » 20 Oct 2016 11:55

Squashman wrote:Windows Anniversary update it broke Quick Books so I had to roll back until my wife decides to update Quick Books to the latest version.


It might be cheaper to get a new wife.
...Erm, ahhh, the devil made me type that. ;)

I'm kidding Squashman and your wife is so crook so I wouldn't be so callous. But what about getting a new PC for Dad?

Or a 2nd hand jobbie with Windows 10?

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: We can use bash in our scripts now in Win10

#20 Post by Squashman » 20 Oct 2016 12:05

foxidrive wrote:
Squashman wrote:But what about getting a new PC for Dad?

Work supplies me with a laptop which has Windows 7. So I really do not need another computer. Doubt we will upgrade to Windows 10 anytime soon. We didn't start using Windows 7 until like 2012.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: We can use bash in our scripts now in Win10

#21 Post by foxidrive » 21 Oct 2016 05:12

Work supplies me with a laptop which has Windows 7.

Ahh.

Doubt we will upgrade to Windows 10 anytime soon.

That's how I feel about it.

Post Reply