Windows 10 Anniversary Update, coming this summer, includes Ubuntu and Bash shell as an optional install. Here’s how to install and get started with it.
Developers and IT professionals can look forward to exciting improvements coming in the first major revision of Windows 10 this summer. One such feature is the Bash Unix shell, providing broad access to a rich collection of command-line tools and applications. The built-in Windows Subsystem for Linux in Windows 10, opens up a whole new world for Windows power users who were previously deterred by the lack of support. Here’s a look at how to install and get started.
Enable Windows Subsystem for Linux in Windows 10
Before users can start using Bash in Windows 10, there are certain requirements.
- Windows 10 Anniversary Update – older builds of Windows 10 such as the November Update, 1511 or 10586, and the July Public release, 10240 are not supported.
- The Windows Subsystem for Linux only works on 64-bit versions of Windows 10. This is because Bash on Windows 10 utilizes Hyper-V, which is not supported in 32-bit versions.
- Internet access is required to download, then install the Bash command-line tools.
- The size of the download is about 200 MBs.
Go to Settings > Update & security > Activation, and select Developer Mode, then click Yes.
Press Windows key + R then type: optionalfeatures.exe then hit Enter on your keyboard. Scroll down then check off Windows Subsystem for Linux then click OK. To complete the installation, a restart is required.
Installing Bash Tools
Press Windows key + X on your keyboard to get the power user menu and choose Command Prompt. At the command prompt, type: bash then hit Enter. Type the letter y then hit Enter again to begin the installation.
Start Bash in Windows 10
There are multiple ways to start Bash in Windows 10. You can use the built-in Command Prompt, PowerShell, or Bourn shell itself. Let’s look at all three.
Click Start, All Apps, under the letter B click Bash on Ubuntu for Windows.
Press Windows key + X then click Command prompt, at the command prompt, type: bash then hit Enter. If you want to be able to access the local file system, press Windows key + X, Command Prompt (Admin) then type bash at the prompt.
I notice Bash works best under Windows PowerShell or Bash itself, some of the commands just don’t work in Command Prompt or require multiple attempts.
Trying Out Linux Commands in Windows 10
To display the date and time on screen type: date at the command prompt and hit Enter.
To find out the currently logged-in user, type: whoami then hit Enter.
If you want to see your current calendar, type: cal then hit enter.
To list all files in the current directory, type ls at the command prompt then hit enter. The current contents of your personal folder will be displayed. To clear your screen, press the Control key + L.
Of course, there are thousands of other commands you can use, but this guide should help you get started.
If you have always wanted to broaden your skills in the fast-growing open-source economy, this opens up new opportunities. You no longer need to set up a virtual machine just to perform certain tasks and configurations with Linux. And you can now do it all from within Windows.