Bash on Windows

, 2017-07-07

With SQL Server coming on Linux, some people will want to learn a bit of Linux. Or perhaps they need to get re-acquainted with the OS, which is my situation. I grew up on DOS, but moved to Unix in university. I’ve dabbled in Linux over the years, but with no real use for it over Windows, I abandoned it a decade ago.

Now, I’m trying to re-learn some things as I play with SQL Server on Linux.

Recently I saw a quick video from Scott Hanselman on the Bash subsystem in Windows. I actually first saw this live at the Build 2016 announcement, but when it was added in Beta to Windows 10, I didn’t add it. I’ve been meaning to, but hadn’t.

Until today.

The video shows, but there are two things to do, well, really 3.

First, enable developer mode. In the W10 Control Panel, type “developer” and you’ll find under Update and Security, a “For Developers” option. I’d enabled “developer mode” before, so that was done for me, but check that box (shown below).

2017-06-28 16_34_18-Settings

Next, hit the Windows key and type “Windows features”. You’ll get this:

2017-06-28 16_34_56-Photos

Click that, and in the dialog, scroll down. You’ll find the Windows Subsystem for Bash. Check it.

2017-06-28 16_35_32-Windows Features

Then Windows will tell you to reboot, so do that. After you reboot, type “bash”.

2017-06-28 16_40_02-Editorials - - Evernote

The command “bash” will open the shell. Once you do that, you have bash running.

2017-06-28 16_40_25-MINGW64__c_Users_Steve

There are options here, though I’m sad this doesn’t integrate into my ConEmu terminal. Maybe soon. The first thing I did was raise the font, because, well, I’m old.

2017-06-28 16_40_49-Options

I’ll have to play around, and get familiar with bash again. I won’t use it a lot, but it could be handy when working with SSoL and needing to SSH or otherwise connect to that vm without firing up rdp or my VMWare console.

I don’t remember lots of commands, but I did manage to get to my C: drive.

2017-06-28 16_44_19-MINGW64__c

Filed under: Blog Tagged: Linux, syndicated





Related content

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future.


1,567 reads

Networking - Part 4

You may want to read Part 1 , Part 2 , and Part 3 before continuing. This time around I'd like to talk about social networking. We'll start with social networking. Facebook, MySpace, and Twitter are all good examples of using technology to let...


1,530 reads

Speaking at Community Events - More Thoughts

Last week I posted Speaking at Community Events - Time to Raise the Bar?, a first cut at talking about to what degree we should require experience for speakers at events like SQLSaturday as well as when it might be appropriate to add additional focus/limitations on the presentations that are accepted. I've got a few more thoughts on the topic this week, and I look forward to your comments.


360 reads