Skip to content

Instantly share code, notes, and snippets.

@rlscode
Forked from leodutra/-setup-windows-wsl-devenv.md
Created January 26, 2021 03:48
Show Gist options
  • Select an option

  • Save rlscode/460cb851c45d9da88c9d4ccca832f38f to your computer and use it in GitHub Desktop.

Select an option

Save rlscode/460cb851c45d9da88c9d4ccca832f38f to your computer and use it in GitHub Desktop.

Revisions

  1. @leodutra leodutra revised this gist Oct 21, 2019. No changes.
  2. @leodutra leodutra revised this gist Oct 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion -install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -70,7 +70,7 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/mas

    ```bash
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
    echo "export NVM_DIR=~/.nvm\n[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> ~/.zshrc
    echo "export NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\"\n[ -s \"$NVM_DIR/bash_completion\" ] && \. \"$NVM_DIR/bash_completion\"" >> ~/.zshrc
    source ~/.zshrc
    ```

  3. @leodutra leodutra revised this gist Oct 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion -install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -99,7 +99,7 @@ npm i -g nodemon pm2 eslint pug
    #### 11. Install neofetch

    ```bash
    nvm install neofetch
    sudo apt install neofetch
    echo 'neofetch' >> ~/.zshrc
    ```

  4. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion -install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -223,7 +223,7 @@ plugins=(

    **[Final .zshrc reference](https://gist.github.com/leodutra/3ae0a87ee20d3c57a9040e06c2d71341)**

    #### Set VSCode integrated terminal font
    #### 20. Set VSCode integrated terminal font

    ```json
    "terminal.integrated.fontFamily": "'FuraMono Nerd Font Mono'",
  5. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion -install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -223,7 +223,14 @@ plugins=(

    **[Final .zshrc reference](https://gist.github.com/leodutra/3ae0a87ee20d3c57a9040e06c2d71341)**

    #### 20. Exit Hyper
    #### Set VSCode integrated terminal font

    ```json
    "terminal.integrated.fontFamily": "'FuraMono Nerd Font Mono'",
    "terminal.integrated.fontSize": 12
    ```

    #### 21. Exit Hyper

    ```bash
    exit
  6. @leodutra leodutra renamed this gist Oct 6, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    ## Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

    ![Preview](https://gist.github.com/leodutra/d3b770377bb9188c105b21751bf47e75/raw/img-preview.png)

    ### Requirements

    - Windows 10 Build 18917+ (only as [Windows Insider](https://insider.windows.com/en-us/how-to-pc/) 09/2019)
  8. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -219,6 +219,8 @@ plugins=(
    )
    ```

    **[Final .zshrc reference](https://gist.github.com/leodutra/3ae0a87ee20d3c57a9040e06c2d71341)**

    #### 20. Exit Hyper

    ```bash
  9. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 1 addition and 23 deletions.
    24 changes: 1 addition & 23 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -103,29 +103,7 @@ echo 'neofetch' >> ~/.zshrc

    #### 12. Install VSCode extensions

    ```bash
    code --install-extension amandeepmittal.pug
    code --install-extension bierner.markdown-preview-github-styles
    code --install-extension DavidAnson.vscode-markdownlint
    code --install-extension dbaeumer.vscode-eslint
    code --install-extension eamodio.gitlens
    code --install-extension formulahendry.code-runner
    code --install-extension hollowtree.vue-snippets
    code --install-extension jianbingfang.dupchecker
    code --install-extension ms-vscode.cpptools
    code --install-extension ms-vscode.csharp
    code --install-extension ms-vscode.vscode-typescript-tslint-plugin
    code --install-extension msjsdiag.debugger-for-chrome
    code --install-extension naumovs.color-highlight
    code --install-extension octref.vetur
    code --install-extension pkief.material-icon-theme
    code --install-extension ritwickdey.LiveServer
    code --install-extension rust-lang.rust
    code --install-extension sysoev.language-stylus
    code --install-extension WallabyJs.quokka-vscode
    code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```
    [Reference](https://gist.github.com/leodutra/941345a39d1f3b1e13e16a860c3385e0)

    #### 13. Install Powerline9k theme for Oh My Zsh

  10. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -57,6 +57,8 @@ choco install hyper vscode -y
    Run in Hyper:

    ```bash
    sudo apt update && sudo apt upgrade -y

    sudo apt install zsh -y
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    ```
  11. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 27 additions and 4 deletions.
    31 changes: 27 additions & 4 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -17,9 +17,9 @@ Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

    #### 2. Install a Linux distro for WSL2

    - open Microsoft Store on Windows
    - search for Linux
    - install Ubuntu 18.04 (recommended)
    - open Microsoft Store on Windows;
    - search for Linux;
    - install Ubuntu 18.04 (recommended).

    #### 3. Install Chocolatey

    @@ -39,6 +39,7 @@ choco install hyper vscode -y

    #### 5. Set Hyper to use WSL

    - Hyper (icon) > Properties > Compatibility > check "Run as adminstrator";
    - open Hyper;
    - Edit > Preferences
    - change lines:
    @@ -100,7 +101,29 @@ echo 'neofetch' >> ~/.zshrc

    #### 12. Install VSCode extensions

    [Reference](https://gist.github.com/leodutra/941345a39d1f3b1e13e16a860c3385e0)
    ```bash
    code --install-extension amandeepmittal.pug
    code --install-extension bierner.markdown-preview-github-styles
    code --install-extension DavidAnson.vscode-markdownlint
    code --install-extension dbaeumer.vscode-eslint
    code --install-extension eamodio.gitlens
    code --install-extension formulahendry.code-runner
    code --install-extension hollowtree.vue-snippets
    code --install-extension jianbingfang.dupchecker
    code --install-extension ms-vscode.cpptools
    code --install-extension ms-vscode.csharp
    code --install-extension ms-vscode.vscode-typescript-tslint-plugin
    code --install-extension msjsdiag.debugger-for-chrome
    code --install-extension naumovs.color-highlight
    code --install-extension octref.vetur
    code --install-extension pkief.material-icon-theme
    code --install-extension ritwickdey.LiveServer
    code --install-extension rust-lang.rust
    code --install-extension sysoev.language-stylus
    code --install-extension WallabyJs.quokka-vscode
    code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```

    #### 13. Install Powerline9k theme for Oh My Zsh

  12. @leodutra leodutra revised this gist Oct 6, 2019. 1 changed file with 1 addition and 23 deletions.
    24 changes: 1 addition & 23 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -100,29 +100,7 @@ echo 'neofetch' >> ~/.zshrc

    #### 12. Install VSCode extensions

    ```bash
    code --install-extension amandeepmittal.pug
    code --install-extension bierner.markdown-preview-github-styles
    code --install-extension DavidAnson.vscode-markdownlint
    code --install-extension dbaeumer.vscode-eslint
    code --install-extension eamodio.gitlens
    code --install-extension formulahendry.code-runner
    code --install-extension hollowtree.vue-snippets
    code --install-extension jianbingfang.dupchecker
    code --install-extension ms-vscode.cpptools
    code --install-extension ms-vscode.csharp
    code --install-extension ms-vscode.vscode-typescript-tslint-plugin
    code --install-extension msjsdiag.debugger-for-chrome
    code --install-extension naumovs.color-highlight
    code --install-extension octref.vetur
    code --install-extension pkief.material-icon-theme
    code --install-extension ritwickdey.LiveServer
    code --install-extension rust-lang.rust
    code --install-extension sysoev.language-stylus
    code --install-extension WallabyJs.quokka-vscode
    code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```
    [Reference](https://gist.github.com/leodutra/941345a39d1f3b1e13e16a860c3385e0)

    #### 13. Install Powerline9k theme for Oh My Zsh

  13. @leodutra leodutra revised this gist Oct 5, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -130,6 +130,12 @@ code --install-extension yzhang.markdown-all-in-one
    git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
    ```

    Then, add to your `~/.zshrc`:

    ```bash
    ZSH_THEME="powerlevel9k/powerlevel9k"
    ```

    #### 14. Install Powerline specific fonts (Nerd Font or Powerline Fonts)

    ##### Nerd Fonts
  14. @leodutra leodutra revised this gist Oct 5, 2019. 1 changed file with 21 additions and 22 deletions.
    43 changes: 21 additions & 22 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -208,29 +208,28 @@ sudo apt install fasd -y

    ```bash
    plugins=(
    git
    npm
    docker
    cargo
    yarn
    rust
    vscode
    npx
    nvm
    systemd
    ansible
    golang
    react-native
    sudo
    aws
    fasd
    ubuntu
    command-not-found
    zsh-autosuggestions
    zsh-completions
    ansible
    aws
    cargo
    command-not-found
    docker
    fasd
    git
    golang
    npm
    npx
    nvm
    react-native
    rust
    sudo
    systemd
    ubuntu
    vscode
    web-search
    yarn
    zsh-autosuggestions
    zsh-completions
    )

    source $ZSH/plugins/fasd/fasd.plugin.zsh
    ```

    #### 20. Exit Hyper
  15. @leodutra leodutra revised this gist Oct 5, 2019. 1 changed file with 103 additions and 12 deletions.
    115 changes: 103 additions & 12 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,6 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/mas

    #### 7. Install NVM using ZSH

    Run in Hyper:

    ```bash
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
    @@ -72,7 +71,6 @@ source ~/.zshrc

    #### 8. Install Node (latest) using NVM

    Run in Hyper:

    ```bash
    nvm install node
    @@ -81,8 +79,6 @@ nvm alias default node

    #### 9. Install Yarn

    Run in Hyper:

    ```bash
    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
    @@ -91,25 +87,19 @@ sudo apt-get update && sudo apt-get install --no-install-recommends yarn

    #### 10. Install Nodemon, PM2, ESLint, Pug

    Run in Hyper:

    ```bash
    npm i -g nodemon pm2 eslint pug
    ```

    #### 11. Install neofetch

    Run in Hyper:

    ```bash
    nvm install neofetch
    echo 'neofetch' >> ~/.zshrc
    ```

    #### 12. Install VSCode extensions

    Run in Hyper:

    ```bash
    code --install-extension amandeepmittal.pug
    code --install-extension bierner.markdown-preview-github-styles
    @@ -134,16 +124,117 @@ code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```

    #### 13. Upgrade Ubuntu
    #### 13. Install Powerline9k theme for Oh My Zsh

    ```bash
    git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
    ```

    #### 14. Install Powerline specific fonts (Nerd Font or Powerline Fonts)

    ##### Nerd Fonts

    For Windows, download and install manually from:
    https://github.com/ryanoasis/nerd-fonts/releases

    ##### Powerline Fonts

    Run in Powershell:

    ```ps1
    git clone https://github.com/powerline/fonts.git --depth=1
    cd fonts
    Set-ExecutionPolicy Bypass
    ./install.ps1
    cd ..
    Remove-Item fonts -Recurse -Force
    ```

    ##### Recommended fonts

    - FuraMono
    - FiraCode
    - Menlo
    - DejaVu Sans
    - Hack
    - HeavyData

    #### 15. Change Hyper font config

    - back to Hyper, open Edit > Preferences;
    - give font name (`fontFamily: '"FuraMono Nerd Font Mono", "FuraMono Nerd Font", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace'`)
    - (optional) set `webGLRenderer: false` if you see 1px spaces in Powerline stripes (causes small performance degradation).

    #### 16. Setup POWERLEVEL9K_MODE and more variables

    Change your `~/.zshrc` and include:

    ```bash
    POWERLEVEL9K_MODE='nerdfont-complete'
    ```

    More options and styling on
    https://github.com/Powerlevel9k/powerlevel9k/wiki/Stylizing-Your-Prompt

    #### 17. Install Hyper plugins

    ```bash
    hyper i hyper-statusline hyper-search hyper-oceanic-next
    ```


    #### 18. Upgrade Ubuntu

    ```bash
    sudo apt upgrade -y
    ```

    #### 14. Exit Hyper
    #### 19. Install ZSH plugins

    ##### Install plugins

    Run in Hyper:

    ```bash
    # zsh-completions
    git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
    # zsh-autosuggestions
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    # fasd
    sudo apt install fasd -y
    ```

    ##### Edit `~/.zshrc` in WSL

    ```bash
    plugins=(
    git
    npm
    docker
    cargo
    yarn
    rust
    vscode
    npx
    nvm
    systemd
    ansible
    golang
    react-native
    sudo
    aws
    fasd
    ubuntu
    command-not-found
    zsh-autosuggestions
    zsh-completions
    )

    source $ZSH/plugins/fasd/fasd.plugin.zsh
    ```

    #### 20. Exit Hyper

    ```bash
    exit
    ```
  16. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,3 @@
    For anyone with the same need... I did these steps, more or less: (without a GUI)

    ## Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

    ### Requirements
  17. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 19 additions and 17 deletions.
    36 changes: 19 additions & 17 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,14 @@
    # Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions
    For anyone with the same need... I did these steps, more or less: (without a GUI)

    ## Requirements
    ## Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

    ### Requirements

    - Windows 10 Build 18917+ (only as [Windows Insider](https://insider.windows.com/en-us/how-to-pc/) 09/2019)

    ## Steps
    ### Steps

    ### 1. Enable WSL2
    #### 1. Enable WSL2

    Run in PowerShell, as admin (elevated):

    @@ -15,29 +17,29 @@ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-L
    Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
    ```

    ### 2. Install a Linux distro for WSL2
    #### 2. Install a Linux distro for WSL2

    - open Microsoft Store on Windows
    - search for Linux
    - install Ubuntu 18.04 (recommended)

    ### 3. Install Chocolatey
    #### 3. Install Chocolatey

    Run in CMD, as admin:

    ```cmd
    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    ```

    ### 4. Install Hyper and VSCode using Chocolatey
    #### 4. Install Hyper and VSCode using Chocolatey

    Run in CMD, as admin:

    ```cmd
    choco install hyper vscode -y
    ```

    ### 5. Set Hyper to use WSL
    #### 5. Set Hyper to use WSL

    - open Hyper;
    - Edit > Preferences
    @@ -51,7 +53,7 @@ choco install hyper vscode -y
    - save preferences;
    - restart Hyper.

    ### 6. Install ZSH and Oh My Zsh
    #### 6. Install ZSH and Oh My Zsh

    Run in Hyper:

    @@ -60,7 +62,7 @@ sudo apt install zsh -y
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    ```

    ### 7. Install NVM using ZSH
    #### 7. Install NVM using ZSH

    Run in Hyper:

    @@ -70,7 +72,7 @@ echo "export NVM_DIR=~/.nvm\n[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"
    source ~/.zshrc
    ```

    ### 8. Install Node (latest) using NVM
    #### 8. Install Node (latest) using NVM

    Run in Hyper:

    @@ -79,7 +81,7 @@ nvm install node
    nvm alias default node
    ```

    ### 9. Install Yarn
    #### 9. Install Yarn

    Run in Hyper:

    @@ -89,15 +91,15 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source
    sudo apt-get update && sudo apt-get install --no-install-recommends yarn
    ```

    ### 10. Install Nodemon, PM2, ESLint, Pug
    #### 10. Install Nodemon, PM2, ESLint, Pug

    Run in Hyper:

    ```bash
    npm i -g nodemon pm2 eslint pug
    ```

    ### 11. Install neofetch
    #### 11. Install neofetch

    Run in Hyper:

    @@ -106,7 +108,7 @@ nvm install neofetch
    echo 'neofetch' >> ~/.zshrc
    ```

    ### 12. Install VSCode extensions
    #### 12. Install VSCode extensions

    Run in Hyper:

    @@ -134,13 +136,13 @@ code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```

    ### 13. Upgrade Ubuntu
    #### 13. Upgrade Ubuntu

    ```bash
    sudo apt upgrade -y
    ```

    ### 14. Exit Hyper
    #### 14. Exit Hyper

    Run in Hyper:

  18. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ## Requirements

    - Windows 10 Build 18917+ (only as Windows Insider 09/2019)
    - Windows 10 Build 18917+ (only as [Windows Insider](https://insider.windows.com/en-us/how-to-pc/) 09/2019)

    ## Steps

  19. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -140,7 +140,7 @@ code --install-extension yzhang.markdown-all-in-one
    sudo apt upgrade -y
    ```

    #### 14. Exit Hyper
    ### 14. Exit Hyper

    Run in Hyper:

  20. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 34 additions and 2 deletions.
    36 changes: 34 additions & 2 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -79,7 +79,25 @@ nvm install node
    nvm alias default node
    ```

    ### 9. Install neofetch
    ### 9. Install Yarn

    Run in Hyper:

    ```bash
    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 && sudo apt-get install --no-install-recommends yarn
    ```

    ### 10. Install Nodemon, PM2, ESLint, Pug

    Run in Hyper:

    ```bash
    npm i -g nodemon pm2 eslint pug
    ```

    ### 11. Install neofetch

    Run in Hyper:

    @@ -88,7 +106,7 @@ nvm install neofetch
    echo 'neofetch' >> ~/.zshrc
    ```

    ### 10. Install VSCode extensions
    ### 12. Install VSCode extensions

    Run in Hyper:

    @@ -115,3 +133,17 @@ code --install-extension WallabyJs.quokka-vscode
    code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```

    ### 13. Upgrade Ubuntu

    ```bash
    sudo apt upgrade -y
    ```

    #### 14. Exit Hyper

    Run in Hyper:

    ```bash
    exit
    ```
  21. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -60,7 +60,7 @@ sudo apt install zsh -y
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    ```

    ### 7. Install NVM on ZSH
    ### 7. Install NVM using ZSH

    Run in Hyper:

  22. @leodutra leodutra revised this gist Oct 4, 2019. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@

    ### 1. Enable WSL2

    Run on PowerShell, as admin (elevated):
    Run in PowerShell, as admin (elevated):

    ```ps1
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    @@ -23,15 +23,15 @@ Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

    ### 3. Install Chocolatey

    Run on CMD, as admin:
    Run in CMD, as admin:

    ```cmd
    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    ```

    ### 4. Install Hyper and VSCode using Chocolatey

    Run on CMD, as admin:
    Run in CMD, as admin:

    ```cmd
    choco install hyper vscode -y
    @@ -53,7 +53,7 @@ choco install hyper vscode -y

    ### 6. Install ZSH and Oh My Zsh

    Run on Hyper:
    Run in Hyper:

    ```bash
    sudo apt install zsh -y
    @@ -62,7 +62,7 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/mas

    ### 7. Install NVM on ZSH

    Run on Hyper:
    Run in Hyper:

    ```bash
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
    @@ -72,7 +72,7 @@ source ~/.zshrc

    ### 8. Install Node (latest) using NVM

    Run on Hyper:
    Run in Hyper:

    ```bash
    nvm install node
    @@ -81,7 +81,7 @@ nvm alias default node

    ### 9. Install neofetch

    Run on Hyper:
    Run in Hyper:

    ```bash
    nvm install neofetch
    @@ -90,7 +90,7 @@ echo 'neofetch' >> ~/.zshrc

    ### 10. Install VSCode extensions

    Run on Hyper:
    Run in Hyper:

    ```bash
    code --install-extension amandeepmittal.pug
  23. @leodutra leodutra created this gist Oct 4, 2019.
    117 changes: 117 additions & 0 deletions install-wsl-devenv.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,117 @@
    # Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

    ## Requirements

    - Windows 10 Build 18917+ (only as Windows Insider 09/2019)

    ## Steps

    ### 1. Enable WSL2

    Run on PowerShell, as admin (elevated):

    ```ps1
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
    ```

    ### 2. Install a Linux distro for WSL2

    - open Microsoft Store on Windows
    - search for Linux
    - install Ubuntu 18.04 (recommended)

    ### 3. Install Chocolatey

    Run on CMD, as admin:

    ```cmd
    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    ```

    ### 4. Install Hyper and VSCode using Chocolatey

    Run on CMD, as admin:

    ```cmd
    choco install hyper vscode -y
    ```

    ### 5. Set Hyper to use WSL

    - open Hyper;
    - Edit > Preferences
    - change lines:

    ```json
    shell: 'C:\\Windows\\System32\\wsl.exe',
    shellArgs: [],
    ```

    - save preferences;
    - restart Hyper.

    ### 6. Install ZSH and Oh My Zsh

    Run on Hyper:

    ```bash
    sudo apt install zsh -y
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    ```

    ### 7. Install NVM on ZSH

    Run on Hyper:

    ```bash
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
    echo "export NVM_DIR=~/.nvm\n[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> ~/.zshrc
    source ~/.zshrc
    ```

    ### 8. Install Node (latest) using NVM

    Run on Hyper:

    ```bash
    nvm install node
    nvm alias default node
    ```

    ### 9. Install neofetch

    Run on Hyper:

    ```bash
    nvm install neofetch
    echo 'neofetch' >> ~/.zshrc
    ```

    ### 10. Install VSCode extensions

    Run on Hyper:

    ```bash
    code --install-extension amandeepmittal.pug
    code --install-extension bierner.markdown-preview-github-styles
    code --install-extension DavidAnson.vscode-markdownlint
    code --install-extension dbaeumer.vscode-eslint
    code --install-extension eamodio.gitlens
    code --install-extension formulahendry.code-runner
    code --install-extension hollowtree.vue-snippets
    code --install-extension jianbingfang.dupchecker
    code --install-extension ms-vscode.cpptools
    code --install-extension ms-vscode.csharp
    code --install-extension ms-vscode.vscode-typescript-tslint-plugin
    code --install-extension msjsdiag.debugger-for-chrome
    code --install-extension naumovs.color-highlight
    code --install-extension octref.vetur
    code --install-extension pkief.material-icon-theme
    code --install-extension ritwickdey.LiveServer
    code --install-extension rust-lang.rust
    code --install-extension sysoev.language-stylus
    code --install-extension WallabyJs.quokka-vscode
    code --install-extension yzane.markdown-pdf
    code --install-extension yzhang.markdown-all-in-one
    ```