<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Lloyd Stubber</title>
    <description>The latest articles on Forem by Lloyd Stubber (@lloydstubber).</description>
    <link>https://forem.com/lloydstubber</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F25204%2Ffd180d29-7473-4394-bad3-bd81c12b5ca1.jpeg</url>
      <title>Forem: Lloyd Stubber</title>
      <link>https://forem.com/lloydstubber</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/lloydstubber"/>
    <language>en</language>
    <item>
      <title>My WSL Setup for Development</title>
      <dc:creator>Lloyd Stubber</dc:creator>
      <pubDate>Sun, 09 Jul 2017 23:17:47 +0000</pubDate>
      <link>https://forem.com/lloydstubber/my-wsl-setup-for-development</link>
      <guid>https://forem.com/lloydstubber/my-wsl-setup-for-development</guid>
      <description>&lt;p&gt;After a few headaches with running the Git Bash on Windows I’ve decided to move over the WSL for all development purposes. I’m very new to Linux so this is a very top-level overview of what I've done and some notes on issues I ran into.&lt;/p&gt;

&lt;p&gt;If you have anything to ad, please comment below or feel free to create a PR for the repo &lt;a href="https://github.com/lloydstubber/My-WSL-Setup"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;h3&gt;
  
  
  Download &amp;amp; Install the WSL
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Follow the very thorough instructions &lt;a href="https://msdn.microsoft.com/en-au/commandline/wsl/install_guide"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Get your terminal looking pretty pt.1
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Download Hyper.js &lt;a href="https://hyper.is/"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;I went with the 'hyperblue' theme&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Automatically open in Bash
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open up Hyper and type &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;,&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Scroll down to shell and change it to &lt;code&gt;C:\\Windows\\System32\\bash.exe&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install Zsh
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run this &lt;code&gt;sudo apt-get install zsh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open your bash profile &lt;code&gt;nano ~/.bashrc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add this to set it to use ZSH as default:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if [ -t 1 ]; then
exec zsh
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Get your terminal looking pretty pt.2
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Install Oh My Zsh with &lt;code&gt;sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Read docs &lt;a href="https://github.com/robbyrussell/oh-my-zsh"&gt;here&lt;/a&gt; on how to add more plugins and change themes (I went with their out of the box 'robbyrussell').&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Fix the ls and cd colours
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Out of the box when you &lt;code&gt;ls&lt;/code&gt; or &lt;code&gt;cd&lt;/code&gt; + &lt;code&gt;Tab&lt;/code&gt; you get some nasty background colours on the directories. To fix this, crack open your ~/.zshrc file and add this to the end:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Change ls colours
LS_COLORS="ow=01;36;40" &amp;amp;&amp;amp; export LS_COLORS

#make cd use the ls colours
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
autoload -Uz compinit
compinit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Git
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run this &lt;code&gt;sudo apt update&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then run &lt;code&gt;sudo apt install git&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setup a SSH key and link to your Github
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Follow the Linux steps &lt;a href="https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-linux"&gt;here&lt;/a&gt; to create a key and add it to your SSH agent&lt;/li&gt;
&lt;li&gt;Then type &lt;code&gt;cat ~/.ssh/id_rsa.pub&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy your key from the terminal and paste it into your Github keys&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install Node Version Manager
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Follow the instructions &lt;a href="https://gist.github.com/micahgodbolt/8b9a338c8bab7bc147975646ea20826c"&gt;here&lt;/a&gt; which will get you running on Node/npm and can easily roll-back versions to suit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install Gulp CLI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Follow the Gulp docs &lt;a href="https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I had trouble with Node/npm/Gulp before realising Ubuntu won’t automatically upgrade from 14.04 to 16.04 - as mentioned in this &lt;a href="https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/"&gt;article&lt;/a&gt;. If you’re in the same boat, upgrade via these &lt;a href="https://help.ubuntu.com/lts/serverguide/installing-upgrading.html"&gt;instructions&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I also had trouble with older versions of Windows 10 not liking Gulp via the WSL - inotify and socket issues. Make sure you're running on the Creators Update or Insiders Program versions.&lt;/li&gt;
&lt;li&gt;If your shell is running slow (mine was) switch from nvm to &lt;a href="https://github.com/mklement0/n-install"&gt;n&lt;/a&gt; and install it with their curl command. First make sure to uninstall nvm and get rid of any trace of Nodejs/npm. If n doesn't work as a command on zsh, it would have installed it's path into your ~/.bashrc so just copy it over to your ~/.zshrc.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>windows</category>
      <category>wsl</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
