BashForWindows: Difference between revisions

From UMIACS
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
<ol>
<ol>
<li> Turn on Developer Mode, Settings app > Update & Security > For Developers > Select the Developer radio button </li>
<li> Turn on Developer Mode, Settings app > Update & Security > For Developers > Select the Developer radio button </li>
<li> Enable the Windows Subsystem for Linux, this can be done through turning on the feature through Windows Features or through an elevated Powershell session using:
<li> Enable the Windows Subsystem for Linux, this can be done by turning on the feature through the Windows Features program or through an elevated (administrator) PowerShell session using:
<code> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux </code>
<code> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux </code>
</li>
</li>
<li> Restart the machine </li>
<li> Restart the machine </li>
<li> Open a command prompt or Powershell session, and then run <code> bash </code>. Follow the remaining on screen instructions to finish setting up WSL. </li>
<li> Open a command prompt or PowerShell session, and then run <code> bash </code>. Follow the remaining on screen instructions to finish setting up WSL. </li>
</ol>
</ol>


==Use==
==Use==


Simply run <code> bash </code> in a command prompt or Powershell session to enter bash. There is no GUI that is installed, nor can be installed. Windows storage and files can then be accessed from <code>/mnt/...</code>, such as <code>/mnt/c/Users/myAccount</code>.
Simply run <code> bash </code> in a command prompt or PowerShell session to enter bash. There is no GUI that is installed, nor can be installed. Windows storage and files can then be accessed from <code>/mnt/...</code>, such as <code>/mnt/c/Users/myAccount</code>.





Revision as of 19:09, 24 March 2017

Microsoft has partnered with Canonical, the makers of Ubuntu, to create the Windows Subsystem on Linux (WSL), which allows Windows 10 users to use Linux command line tools on Windows files through Bash such as grep, sed, git.

Prerequisites

In order to install Bash/WSL, the Windows 10 OS must be a 64-bit version of Windows 10 Anniversary Update build 14393 or later. In Windows 10 , open the Settings app > System > About to check if the Windows 10 version is compatible. Bash/WSL cannot be installed on Windows 7 or Windows Servers, currently only Windows 10 is supported.

Installation

  1. Turn on Developer Mode, Settings app > Update & Security > For Developers > Select the Developer radio button
  2. Enable the Windows Subsystem for Linux, this can be done by turning on the feature through the Windows Features program or through an elevated (administrator) PowerShell session using: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  3. Restart the machine
  4. Open a command prompt or PowerShell session, and then run bash . Follow the remaining on screen instructions to finish setting up WSL.

Use

Simply run bash in a command prompt or PowerShell session to enter bash. There is no GUI that is installed, nor can be installed. Windows storage and files can then be accessed from /mnt/..., such as /mnt/c/Users/myAccount.


External Links