Skip to content

Instantly share code, notes, and snippets.

Created January 25, 2018 19:21
Show Gist options
  • Save kevbost/35c31060196e1f60a756a6af3f78e35a to your computer and use it in GitHub Desktop.
Save kevbost/35c31060196e1f60a756a6af3f78e35a to your computer and use it in GitHub Desktop.
WSL Install Guide Windows


Windows Subsystem for Linux [Very Easy Installation]


    • [Follow instructions carefully and remember your password]
    • [it will prompt for password]
    • [password will not appear while you type, just push enter when finished]
  2. Open "Bash on Ubuntu on Windows"

  3. Run the commands formatted as code separately

    • (they will take a while to complete)
    • (the lines in [brackets] are just comments -- not commands)
  4. Basic setup, fixing outbound connection issue and updating Linux

    • ing=$(hostname); str=" "; echo $str$ing | sudo tee --append /etc/hosts;
    • [appends localhost with your computers "name" to the hosts file]
    • sudo apt-get update && sudo apt-get upgrade -y
    • sudo apt-get install python-software-properties curl wget -y
    • curl -sL | sudo -E bash -
    • [we'll install node later, ignore the message for now]
  5. Yarn Package Manager for Node

    • curl -sS | sudo apt-key add -
    • echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
    • sudo apt-get update
  6. Installing various Linux packages that we need

    • sudo apt-get install git-core nodejs silversearcher-ag yarn zsh toilet libaa-bin -y
    • chsh -s $(which zsh) # this doesn’t really work, run it anyways
    • sh -c "$(curl -fsSL"
  7. Force Bash to run ZSH as default environment (patch for windows)

    • nano ~/.bashrc
    • [opens the file located at /home/$(whoami)/.bashrc in a text editor]
    • [push enter to create a new line at the top of the file, then keyboard arrow up]
    • [add the following to line 1 of ~/.bashrc]
    • bash -c zsh
    • [save the file: on your keyboard, press CTRL+X, then Y, then ENTER]
    • [I know, it doesn’t really make sense to anyone, but that saves the file and exits back to the command line]
    • [exit out of bash and re-open]
    • [if asked, pick option ZERO]
  8. Install "n" node version manager with Yarn (from npm repository)

    • sudo yarn global add n
    • sudo n latest
  9. Finishing up, lets update your ZSHRC file with some useful aliases

    • [run the following line to backup your current configuration file and create a new one]
    • [feel free to follow the link and look it over, its mostly just aliases]
    • mv ~/.zshrc ~/.zshrc.original && wget -O ~/.zshrc
  10. Yay linux!

    • [try this one, I think you'll like it – but it may or may not work for you]
    • telnet
    • [this is a good one too]
    • toilet lol toilet
    • [and this]
    • sudo apt-get install sl && sl
  11. Selection of aliases

    • edit [open the ~/.zshrc file in nano]
    • reload [reload the ~/.zshrc configuration file]
    • update [sudo apt-get update && sudo apt-get dist-upgrade –y]
    • la [ls –lAh (lists file in directory in vertical list form with details)]
    • gs [git status]
    • ws [cd /mnt/c/Workspace]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment