Skip to content

Instantly share code, notes, and snippets.

@kevbost
Created January 25, 2018 19:21
  • Star 11 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
WSL Install Guide Windows

Ubuntu

Windows Subsystem for Linux [Very Easy Installation]

  1. https://msdn.microsoft.com/commandline/wsl/install_guide

    • [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="127.0.0.1 "; 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 https://deb.nodesource.com/setup_8.x | sudo -E bash -
    • [we'll install node later, ignore the message for now]
  5. Yarn Package Manager for Node

    • [YARN IS THE SAME AS NPM BUT FASTER AND SAFER FOR SHARED DEVELOPMENT]
    • curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
    • echo "deb https://dl.yarnpkg.com/debian/ 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 https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  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 https://gist.githubusercontent.com/kevbost/eaa4e466565e193d4a21a45ab3bc44ec/raw
  10. Yay linux!

    • [try this one, I think you'll like it – but it may or may not work for you]
    • telnet towel.blinkenlights.nl
    • [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