Skip to content

Instantly share code, notes, and snippets.

@develleoper
Last active April 16, 2020 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save develleoper/482f714f44c8c99a210485264d394a52 to your computer and use it in GitHub Desktop.
Save develleoper/482f714f44c8c99a210485264d394a52 to your computer and use it in GitHub Desktop.
Configuring a WSL Development Workstation

Configure Windows

Install the Windows Subsystem for Linux (Ubuntu)

https://docs.microsoft.com/en-us/windows/wsl/install-win10

Configure WSL Path Variables in cmd (reference)

setx WSLENV "USERPROFILE/p"

Install and Configure Git

https://git-scm.com/download/win

Configure Git User and GitHub Authentication

https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
https://help.github.com/articles/connecting-to-github-with-ssh/

Install and Configure Visual Studio Code

https://code.visualstudio.com/

Install the Fira Code Font

https://github.com/tonsky/FiraCode

Configure settings.json

{
  "diffEditor.ignoreTrimWhitespace": true,
  "editor.acceptSuggestionOnEnter": "off",
  "editor.fontFamily": "Fira Code",
  "editor.fontLigatures": true,
  "editor.formatOnSave": true,
  "editor.minimap.maxColumn": 40,
  "editor.minimap.renderCharacters": false,
  "editor.minimap.showSlider": "always",
  "editor.renderIndentGuides": true,
  "editor.tabSize": 2,
  "emmet.showExpandedAbbreviation": "never",
  "explorer.openEditors.visible": 0,
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": false,
  "files.hotExit": "onExitAndWindowClose",
  "terminal.integrated.shell.windows": "wsl.exe",
  "terminal.integrated.fontFamily": "Fira Code",
  "window.menuBarVisibility": "toggle",
  "window.restoreFullscreen": true,
  "window.restoreWindows": "all",
  "workbench.colorTheme": "Material Theme Darker High Contrast",

  "gitlens.blame.avatars": false,
  "gitlens.blame.format": "${id|7}",
  "gitlens.blame.highlight.locations": [],
  "gitlens.blame.ignoreWhitespace": true,
  "gitlens.codeLens.enabled": false,
  "gitlens.currentLine.enabled": false,
  "gitlens.gitExplorer.location": "scm",
  "gitlens.heatmap.toggleMode": "window",
  "gitlens.historyExplorer.location": "scm",
  "gitlens.hovers.enabled": false,
  "gitlens.menus": false,
  "gitlens.resultsExplorer.location": "scm",
  "gitlens.statusBar.alignment": "left",
  "gitlens.statusBar.format": "${message} (${authorAgoOrDate})",
  "gitlens.statusBar.reduceFlicker": true
}

Configure Linux

https://docs.microsoft.com/en-us/windows/wsl/initialize-distro

Create /etc/wsl.conf (reference)

[automount]
options = "metadata,umask=2"

Create User Profile Symlinks

ln -s $USERPROFILE/Workspaces ~/local
ln -s $USERPROFILE/.gitconfig ~/.gitconfig
ln -s $USERPROFILE/.ssh ~/.ssh

Install Development Libraries

Install Git

https://git-scm.com/download/linux

Install Node.js

https://nodejs.org/

Customize the Login Shell

Install Fish Shell and Configure Default

https://fishshell.com/
https://fishshell.com/docs/current/faq.html#faq-default

Install TheFuck

https://github.com/nvbn/thefuck

Add Shell Alias ~/.config/fish/config.fish

thefuck --alias | source

Install Fisher Shell Package Manager

https://github.com/jorgebucaran/fisher

Install Spacefish Fish Shell Theme

https://github.com/matchai/spacefish

@develleoper
Copy link
Author

develleoper commented Apr 5, 2019

Update:

@develleoper
Copy link
Author

develleoper commented Apr 16, 2020

  • ~/.bashrc should have umask 022 added

@develleoper
Copy link
Author

develleoper commented Apr 16, 2020

sudo apt-get install build-essential
export N_PREFIX=~/.n
curl -L https://git.io/n-install | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment