Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Instagram Youtube

Github Stackoverflow Pinterest

It’s less like Power Rangers clicking rings, more like living in a foreign country

Overview

As of this writing (June 2017), this was as its first “beta” release.

### Enable Windows Subsystem for Linux feature (GUI)

  1. From Start, type in the search box

    Turn Windows features on or off
    

    and select it when it appears.

    Please wait a while for all items to appear.

  2. Select “Windows Subsystem for Linux (beta)”, then click OK to exit dialog, then Restart your computer.

    This option was added since the “Anniversary” and “Creators Update” of Windows 10.

    Skip to next topic if you see it.

    Don’t see it?

    Verify your PC’s CPU architecture and Windows version/build number:

  3. Start: Click the Windows icon or keyboard key to open Settings, System, About.

    If your OS Build is not above 14393, update. You need the Windows 10 Anniversary Update. Creators Update is recommended.

    If your System type is not “64-bit”, get another computer.

    Turn on Developer Mode

  4. Open Settings -> Update and Security -> For developers
  5. Check the Developer Mode radio button to “install any signed app”.

    First time Bash

  6. Open a command prompt (click Start and type Command, then select it from the list that arises)

    QUESTION: Run as Administrator/elevated?

  7. Type:

    bash
    

    During Beta period, this message appears:

    -- Beta feature --
    This will install Ubuntu on Windows, distributed by Canonical
    and licensed under its terms available here:
    https://aka.ms/uowterms
    
  8. Type y and press Enter to continue. The response:

    Downloading from the Windows Store... 100%
    Extracting filesystem, this will take a few minutes...
    Installation successful~
    Please enter a UNIX user name: _
    

    QUESTION: What is downloaded and can it be deleted?

    The image downloaded is a Ubuntu user-mode image.

  9. Type a user name

    Enter new UNIX password: _
    

    This username and password can be different from, and has no relationship to Windows username and password.

    PROTIP: The user is not root.

    https://msdn.microsoft.com/en-us/commandline/wsl/user_support

  10. Type a password.

    A shortcut is added to your start menu named:

    Bash on Ubuntu on Windows

  11. Click it so you don’t have to type “bash”.

    By default, the prompt is your Linux user name @ your machine name:/mnt/c/Users/%USERNAME%$

    Folders and variables

  12. See where Ubuntu is installed using a Windows system variable referenced using Windows % wrapper rather than Bash $ prefix.

    %localappdata%\lxss\
    

    The directory is marked as a hidden system folder. Creating and/or modifying files in this location using Windows tools and apps corrupts because it gets read-locked. An explanation is this.

    Edit files

  13. Create a project folder under a Linux mount for use by both Windows and Linux tools:

    cd /mnt/c/dev/
    mkdir project
    
  14. Access files from both Windows and from Bash as:

    /mnt/c/path
    
  15. Utilities:

    du -sh
    

Architecture

bash-windows-wsl file-system-graphic-1024x547

Lxcore.sys is the driver that recognizes Bash commands and other Linux utilities such as chmod to change permissions.

VFS is the Virtual File System.

From inside Bash, DrvFS gets to Windows.

From inside Windows, VolFS gets to Linux symbolic files and its case sensitivity.

NTFS is the NT File System controlling hard drives.

Testing

NOTE: To run Python for Selenium controlling Firefox, install Xming with gekoDriver.

References

Links and issues for this are on:
https://github.com/Microsoft/BashOnWindows

https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/ published 15 June 2016 by Jack Hammons, who writes:
https://blogs.msdn.microsoft.com/wsl, the home page of WSL.

More on DevOps

This is one of a series on DevOps:

  1. DevOps_2.0
  2. ci-cd (Continuous Integration and Continuous Delivery)
  3. User Stories for DevOps

  4. Git and GitHub vs File Archival
  5. Git Commands and Statuses
  6. Git Commit, Tag, Push
  7. Git Utilities
  8. Data Security GitHub
  9. GitHub API
  10. TFS vs. GitHub

  11. Choices for DevOps Technologies
  12. Java DevOps Workflow
  13. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  14. AWS server deployment options

  15. Cloud regions
  16. AWS Virtual Private Cloud
  17. Azure Cloud Onramp
  18. Azure Cloud
  19. Azure Cloud Powershell
  20. Bash Windows using Microsoft’s WSL (Windows Subystem for Linux)

  21. Digital Ocean
  22. Cloud Foundry

  23. Packer automation to build Vagrant images
  24. Terraform multi-cloud provisioning automation

  25. Powershell Ecosystem
  26. Powershell on MacOS
  27. Powershell Desired System Configuration

  28. Jenkins Server Setup
  29. Jenkins Plug-ins
  30. Jenkins Freestyle jobs
  31. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  32. Dockerize apps
  33. Docker Setup
  34. Docker Build

  35. Maven on MacOSX

  36. Ansible

  37. MySQL Setup

  38. SonarQube static code scan

  39. API Management Microsoft
  40. API Management Amazon

  41. Scenarios for load