SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

The Voice of the DBA

Steve Jones is the editor of SQLServerCentral.com and visits a wide variety of data related topics in his daily editorial. Steve has spent years working as a DBA and general purpose Windows administrator, primarily working with SQL Server since it was ported from Sybase in 1990. You can follow Steve on Twitter at twitter.com/way0utwest

Bash on Windows

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 - sjones@dkranch.net - 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

Comments

Leave a comment on the original post [voiceofthedba.com, opens in a new window]

Loading comments...