{"componentChunkName":"component---src-templates-blog-post-template-js","path":"/2018/01/13/wsl-bootstrap/","result":{"data":{"mdx":{"id":"fd6eb1dc-2ac9-5b7d-8568-ac08adf20762","frontmatter":{"title":"Windows Subsystem Linux setup","date":"2018 January 13th","cover":{"id":"64bd87f0-5b32-55c7-a5bd-1e163f1965e4","publicURL":"/static/cover-a66966145cbd701a5831e3eeaa327a43.jpg"}},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"date\": \"2018-01-13T00:00:00.000Z\",\n  \"title\": \"Windows Subsystem Linux setup\",\n  \"tags\": [\"information\", \"guide\", \"wsl\", \"bash on windows\", \"n\", \"node\"],\n  \"published\": true,\n  \"cover\": \"./cover.jpg\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"I\\u2019m a Windows user, I have been a Linux user as well but I have found\\nthat Windows is a bit less \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://theoatmeal.com/blog/fix_computer\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"neckbeardy\"), \" for me, both\\nhave their pros and cons. One of the big cons with Windows for me was\\nwhen I started learning web development.\"), mdx(\"p\", null, \"That was until Windows Subsystem Linux came along \\uD83D\\uDE4F\"), mdx(\"p\", null, \"I love it, you can have a bash shell in Windows and run all your node\\napps through it too and with the Windows 10 Fall Creators Update WSL\\nis really straightforward to set up.\"), mdx(\"p\", null, \"Quick backstory on why I\\u2019m posting this: I nuked my laptop the other\\nday as I was having issues with bash on Windows. Related partly to\\nusing \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/Microsoft/WSL/issues/776\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"nvm\"), \" with WSL and generally getting frustrated with\\nhow my computer was performing. I realise now I over reacted.\"), mdx(\"p\", null, \"So I have had to set up my development environment again from scratch,\\nluckily for me I keep all my settings and config information in a\\nGitHub \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/settings\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"repo\"), \" in the event of me getting a new computer\\nor to recover from a catastrophic event \", \"[like a nuked computer]\", \".\"), mdx(\"p\", null, \"Here\\u2019s how I set up \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"my\"), \" Windows Subsystem Linux for my development\\nenvironment.\"), mdx(\"p\", null, \"This is my opinionated view on my specif setup and usage of WSL and\\nthis is my step by step guide for the next time I have to spin up a\\ndevelopment environment from scratch on Windows.\"), mdx(\"p\", null, \"So, after installing \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://www.microsoft.com/store/productId/9NBLGGH4MSV6\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"WSL\"), \" from the Microsoft Store and\\nadding your default user, fist thing is to update and upgrade all the\\nthings.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"sudo apt update\\nsudo apt -y upgrade\\n\")), mdx(\"p\", null, \"If you\\u2019ve not used any Linux distributions before the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"-y\"), \" in the\\nupgrade statement is to default the answer to yes for any prompts that\\nare displayed in the terminal. You might not want to do this, as there\\nmay be some programs you don\\u2019t want to update but I do.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"640px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/d9fdf06ee6eadf39561e9293149c669e/6a6e9/upgrade-yes.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": [\"noopener\"]\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"26.876513317191282%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/svg+xml,%3csvg%20xmlns=\\\\'http://www.w3.org/2000/svg\\\\'%20width=\\\\'400\\\\'%20height=\\\\'108\\\\'%3e%3cpath%20d=\\\\'M0%204c0%204%200%205%202%204%202%200%202%200%202%202s0%203-2%203c-1-1-2%200-2%201l2%202%202%202c0%201%200%202-1%201v1l-1%201c-2-1-2%200-2%201l2%202c1%200%202%200%202%202l-1%202c-2-1-3%200-3%203l1%202h1l1%202c1%201%200%201-1%201l-2-1v18c0%2016%200%2017%202%2017l2%201H2c-2%200-2%200-2%203l1%204%203%201c5%201%209%201%2010-1%202-1%202-1%202%201%200%203-2%205-3%203H2l-2%204c0%202%200%202%201%201%201-2%201-2%202-1v4c-2%200-3%200-3%202l1%201c1%200%202%201%201%202%200%202%200%202%201%201%201-2%204-3%203%200h2l-2%202c-6-1-6%200-6%205v5h401V0H278a894%20894%200%2000-119%204h-11c-1-1-2%200-3%201-3%202-4%203-5%200h-1c-2%201-7%200-7-2h3c0-2%2010-2%2013-1h5c1-2-1-2-21-2l-23%201%202%201%202%201h-2v1l-6%201c-6%200-7%200-7-2l1-2%201%201h1l2%201h1l1-2h2c1-1-1-1-6-1-8%200-8%201-8%203l-1%202-1-3c0-2-1-2-6-2-4%200-6%200-5%201h1l1%202-1%202-1-1h-7c0%202-2%201-2-1V1l1%201h3l2-1c1-1-1-1-5-1-6%200-7%200-6%202h-2v3l-1-2c0-2%200-3-1-2l-1%201-1%201-1-1V0c-1%200-2%201-1%202l-1%203c-1%200-2-1-2-3l-2-2c-2%200-3%200-2%201l-2%203c-2%201-2%201-3-1%200-2%200-2-2%200-1%201-1%201-1-1V0l-1%203v3l-1-3c-1-3-1-3-3-2v2l-1%201c-1%201-1%200-1-1l1-2c1-1%200-1-1-1l-2%202-1%201-1-1V0l-3%203%201%201c1%201%200%201-3%201-3-1-4%200-5%201-1%202-2-1-2-4%201-2%200-2-10-2H0v4m37%2013c-2%202-1%205%201%203h5c0%202%202%203%203%201h2l2-1h1l1-1h1l5%201h3l1-1h3l1%201h1c2%201%202%201%202-1s-1-2-6-2h-6c-2%201-18%201-18-1%200-1-1-1-2%201\\\\'%20fill=\\\\'%23d3d3d3\\\\'%20fill-rule=\\\\'evenodd\\\\'/%3e%3c/svg%3e')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"a\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/d9fdf06ee6eadf39561e9293149c669e/60a22/upgrade-yes.webp 160w\", \"/static/d9fdf06ee6eadf39561e9293149c669e/4c812/upgrade-yes.webp 320w\", \"/static/d9fdf06ee6eadf39561e9293149c669e/0ba47/upgrade-yes.webp 640w\", \"/static/d9fdf06ee6eadf39561e9293149c669e/40616/upgrade-yes.webp 826w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/d9fdf06ee6eadf39561e9293149c669e/69538/upgrade-yes.png 160w\", \"/static/d9fdf06ee6eadf39561e9293149c669e/72799/upgrade-yes.png 320w\", \"/static/d9fdf06ee6eadf39561e9293149c669e/6af66/upgrade-yes.png 640w\", \"/static/d9fdf06ee6eadf39561e9293149c669e/6a6e9/upgrade-yes.png 826w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/d9fdf06ee6eadf39561e9293149c669e/6af66/upgrade-yes.png\",\n    \"alt\": \"upgrade image\",\n    \"title\": \"upgrade image\",\n    \"loading\": \"lazy\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  })), \"\\n      \"), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"You wont have these messages \\uD83D\\uDC46\"), mdx(\"h3\", {\n    \"id\": \"build-tools\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#build-tools\",\n    \"aria-label\": \"build tools permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Build tools\"), mdx(\"p\", null, \"To compile and install native addons from npm you may also need to\\ninstall build tools, I need this for Gatsby images which uses \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"sharp\"), \"\\nwhich in turn uses \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"node-gyp\"), \":\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"sudo apt install -y build-essential\\n\")), mdx(\"h3\", {\n    \"id\": \"install-node\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#install-node\",\n    \"aria-label\": \"install node permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Install node\"), mdx(\"p\", null, \"Installing node via the instructions given on the nodejs.org site\\ndoesn\\u2019t give the correct permissions for me, so when trying to\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"npm install\"), \" anything I get errors, I found using \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/Microsoft/WSL/issues/776#issuecomment-266112578\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"using \", mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"n\")), \"\\nhelps:\"), mdx(\"h3\", {\n    \"id\": \"install-node-with-n\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#install-node-with-n\",\n    \"aria-label\": \"install node with n permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Install node with \", mdx(\"inlineCode\", {\n    parentName: \"h3\"\n  }, \"n\")), mdx(\"p\", null, \"As it\\u2019s a fresh install then we can go ahead and use \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/mklement0/n-install\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"n-install\"), \" with:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"curl -L https://git.io/n-install | bash\\n\")), mdx(\"p\", null, \"This will install the latest stable version of node \\uD83D\\uDC4D\"), mdx(\"p\", null, \"Once the script is complete restart bash with:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \". /home/my_user_name/.bashrc # the n prompt displays this for you to copy pasta\\n\")), mdx(\"p\", null, \"Check your node and npm versions:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"node -v && npm -v\\n\")), mdx(\"h3\", {\n    \"id\": \"install-fish-\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#install-fish-\",\n    \"aria-label\": \"install fish  permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Install fish \\uD83D\\uDC1F\\uD83D\\uDC1A\"), mdx(\"p\", null, \"Fish is now my go to shell purely for the auto complete/intellisense\\n\\uD83D\\uDC4C there\\u2019s also some nice themes you can get for it too.\"), mdx(\"p\", null, \"There\\u2019s two options here, one is to use the standard package that come\\npre installed with the Ubuntu install or you can use the Fish \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"#\",\n    \"title\": \"Personal Package Archive\"\n  }), \"PPA\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Use the standard package:\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"sudo apt -y install fish\\nsudo apt -y upgrade && sudo apt -y autoremove\\n\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Use the Fish shell \", mdx(\"a\", _extends({\n    parentName: \"strong\"\n  }, {\n    \"href\": \"#\",\n    \"title\": \"Personal Package Archive\"\n  }), \"PPA\"), \":\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"sudo apt-add-repository ppa:fish-shell/release-2\\nsudo apt update && sudo apt -y install fish\\n\")), mdx(\"h3\", {\n    \"id\": \"install-oh-my-fish--omf\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#install-oh-my-fish--omf\",\n    \"aria-label\": \"install oh my fish  omf permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Install Oh My Fish | OMF\"), mdx(\"p\", null, \"Oh My Fish is like a package manager for Fish enabling the instal of\\npackages and themes.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"curl -L https://get.oh-my.fish | fish\\n\")), mdx(\"h3\", {\n    \"id\": \"install-omf-theme\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#install-omf-theme\",\n    \"aria-label\": \"install omf theme permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Install OMF theme\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"omf install clearance\\n\")), mdx(\"h3\", {\n    \"id\": \"the-start-of-the-beginning\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#the-start-of-the-beginning\",\n    \"aria-label\": \"the start of the beginning permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"The start of the beginning\"), mdx(\"p\", null, \"Ok, so that is a basic setup for WSL, you\\u2019ll probably want to get Git\\nset up now, I have been using SSH over HTTPS for a while now on WSL.\"), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"At the time of writing this WSL Git integration with VSCode doesn\\u2019t\\nwork so I have added a Git install to my windows machine, you can\\nomit this and go full Git via the terminal but I really like the\\nVSCode git integration.\")), mdx(\"p\", null, \"To get SSH set up on your machine take a look at this \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/cheat-sheets/blob/master/git.md#how-to-authenticate-with-github-using-ssh\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"handy SSH\\nsetup\"), \". I say SSH instead of HTTPS 1. because I had all sorts of\\nissues with the Git credential manager and the keyring manager in the\\nend it was actually quicker to create an SSH key and authenticate with\\nGitHub - the guide I linked walks you through it.\"), mdx(\"h3\", {\n    \"id\": \"move-your-dotfiles\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#move-your-dotfiles\",\n    \"aria-label\": \"move your dotfiles permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Move your dotfiles\"), mdx(\"p\", null, \"If you have all your \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/dotfiles\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"dotfiles\"), \" backed up in a GitHub repo then now is\\na good time to add them to your WSL folder, the last times I did this\\nI manually set the permissions after moving each of the the files but\\nhave since discovered \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://www.tecmint.com/rsync-local-remote-file-synchronization-commands/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"rsync\")), \" to move all the files.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"rsync -avzh /mnt/c/Users/dotfiles/ ~/\\n\")), mdx(\"p\", null, \"That will copy the contents of my \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"dotfiles\"), \" folder to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"~/\"), \" (home)\\ndirectory in WSL, you can check them with:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"ls -la ~/\\n\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"581px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/7499ad1ca9beabe2915014e11a7368d4/92d15/bash-wrong-perms.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": [\"noopener\"]\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"52.49569707401033%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/svg+xml,%3csvg%20xmlns=\\\\'http://www.w3.org/2000/svg\\\\'%20width=\\\\'400\\\\'%20height=\\\\'210\\\\'%3e%3cpath%20d=\\\\'M0%20105v105h401V0H0v105m246-3l1%2012h18l20-1%205-10-3%204-2%205v-5c0-5%200-5-3-5-2%200-3%200-2-1l5-9c-1%200-1-1-4%205l-1%204-1-5v-5h-33v11m7%2028c0%202%200%202%201%201l1-2v4c0%201-2%202-5%202h-4v17l1%2017h10c11%200%2012%200%2015-7%203-5%201-5-1%200l-2%205-1-5v-5h-8c-7%200-8%200-7-2l3-5%201-3h11c8%200%2010%200%2012-2l5-9-3%204c-3%205-3%205-3-4%200-7%200-8-2-8l-2%202c0%202%200%202%201%201l1-2v4c0%201-4%202-11%202h-10l1-3c0-4%200-4-2-4l-2%202\\\\'%20fill=\\\\'%23d3d3d3\\\\'%20fill-rule=\\\\'evenodd\\\\'/%3e%3c/svg%3e')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"a\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/7499ad1ca9beabe2915014e11a7368d4/60a22/bash-wrong-perms.webp 160w\", \"/static/7499ad1ca9beabe2915014e11a7368d4/4c812/bash-wrong-perms.webp 320w\", \"/static/7499ad1ca9beabe2915014e11a7368d4/39daa/bash-wrong-perms.webp 581w\"],\n    \"sizes\": \"(max-width: 581px) 100vw, 581px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/7499ad1ca9beabe2915014e11a7368d4/69538/bash-wrong-perms.png 160w\", \"/static/7499ad1ca9beabe2915014e11a7368d4/72799/bash-wrong-perms.png 320w\", \"/static/7499ad1ca9beabe2915014e11a7368d4/92d15/bash-wrong-perms.png 581w\"],\n    \"sizes\": \"(max-width: 581px) 100vw, 581px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/7499ad1ca9beabe2915014e11a7368d4/92d15/bash-wrong-perms.png\",\n    \"alt\": \"bash files wrong permissions\",\n    \"title\": \"bash files wrong permissions\",\n    \"loading\": \"lazy\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  })), \"\\n      \"), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"I copied across my \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".gitconfig\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".gitignore\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".npmrc\"), \" dotfiles\\npictured here and you can see that the permissions are not consistent\\nwith the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".bashrc\"), \" file.\"), mdx(\"p\", null, \"So, the only way I know how to change the file permissions is with\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"chmod\"), \" to get the ordinals of a similar file use \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"stat\"), \":\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"stat -c \\\"%a %n\\\" ~/.*\\n\")), mdx(\"p\", null, \"This will list out all everything that begins with a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".\"), \" here\\u2019s mine:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"777 /home/scott/.\\n755 /home/scott/..\\n600 /home/scott/.bash_history\\n644 /home/scott/.bash_logout\\n644 /home/scott/.bashrc\\n777 /home/scott/.cache\\n777 /home/scott/.config\\n777 /home/scott/.gitconfig\\n777 /home/scott/.gitignore\\n777 /home/scott/.local\\n777 /home/scott/.npm\\n777 /home/scott/.npmrc\\n644 /home/scott/.profile\\n644 /home/scott/.sudo_as_admin_successful\\n\")), mdx(\"p\", null, \"I only want to change \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".gitconfig\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".gitignore\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".npmrc\"), \" here so\\nI\\u2019m going to do this:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"chmod 644 .gitconfig .gitignore .npmrc\\n\")), mdx(\"p\", null, \"And now my files look like this. \\uD83D\\uDC4D\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"572px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/dad0b2d87dfb1eba5a9fc5320da452ce/a805e/bash-dotfiles.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": [\"noopener\"]\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"67.4825174825175%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/svg+xml,%3csvg%20xmlns=\\\\'http://www.w3.org/2000/svg\\\\'%20width=\\\\'400\\\\'%20height=\\\\'270\\\\'%3e%3cpath%20d=\\\\'M0%20135v135h401V0H0v135m244-31v11h19l21-1%204-9-3%204-2%205v-5c0-5%200-5-2-5h-3l3-4%202-6c-1-1-2%200-3%203-2%205-3%205-2%200v-4h-34v11m7%2026v5c3%201%200%203-4%202h-3v57h11c8%200%2010%200%2012-2l5-9c-1%200-1-1-4%205l-1%204-1-5%201-6%205-8c0-2-2%200-3%203-2%205-3%205-3%200v-5h13c16%200%2017%200%2019-6%203-6%202-6-1%200l-2%205-1-5v-5h-16l3-4%202-6c-1-1-2%200-3%203-2%205-3%205-2%200%200-4%200-4-3-4s-4-1-2-2l4-9-3%204-1%204-1-4v-4h-10l-8-1v-7h-3m5%2071v4h-12v11h10c13%200%2014%200%2016-6%203-6%202-6-1%200l-3%205v-10h-4c-4%200-5%200-2-3h1l4%201c4%200%204-1%204-3l1-2c1-1-2-1-6-1h-8v4m-5%2019l-1%204c0%203%200%203-3%203s-3%200-3%206v5h10l12-1c2%200%206-7%206-8%200-2-2%200-4%203l-1%205-1-5v-5h-7c-7%200-9-1-5-2%202-1%201-5-1-6l-2%201\\\\'%20fill=\\\\'%23d3d3d3\\\\'%20fill-rule=\\\\'evenodd\\\\'/%3e%3c/svg%3e')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"a\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/dad0b2d87dfb1eba5a9fc5320da452ce/60a22/bash-dotfiles.webp 160w\", \"/static/dad0b2d87dfb1eba5a9fc5320da452ce/4c812/bash-dotfiles.webp 320w\", \"/static/dad0b2d87dfb1eba5a9fc5320da452ce/a64e8/bash-dotfiles.webp 572w\"],\n    \"sizes\": \"(max-width: 572px) 100vw, 572px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/dad0b2d87dfb1eba5a9fc5320da452ce/69538/bash-dotfiles.png 160w\", \"/static/dad0b2d87dfb1eba5a9fc5320da452ce/72799/bash-dotfiles.png 320w\", \"/static/dad0b2d87dfb1eba5a9fc5320da452ce/a805e/bash-dotfiles.png 572w\"],\n    \"sizes\": \"(max-width: 572px) 100vw, 572px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/dad0b2d87dfb1eba5a9fc5320da452ce/a805e/bash-dotfiles.png\",\n    \"alt\": \"bash files permissions\",\n    \"title\": \"bash files permissions\",\n    \"loading\": \"lazy\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  })), \"\\n      \"), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"Ok now were up and running with an up to date Ubuntu install, node and\\nfish terminal. Of course there\\u2019s still the case of installing all your\\nglobal npm packages you want for development now.\"));\n}\n;\nMDXContent.isMDXComponent = true;","excerpt":"I'm a Windows user, I have been a Linux user as well but I have found\nthat Windows is a bit less  neckbeardy  for me, both\nhave their pros…","tableOfContents":{"items":[{"url":"#build-tools","title":"Build tools"},{"url":"#install-node","title":"Install node"},{"url":"#install-node-with-n","title":"Install node with n"},{"url":"#install-fish-","title":"Install fish 🐟🐚"},{"url":"#install-oh-my-fish--omf","title":"Install Oh My Fish | OMF"},{"url":"#install-omf-theme","title":"Install OMF theme"},{"url":"#the-start-of-the-beginning","title":"The start of the beginning"},{"url":"#move-your-dotfiles","title":"Move your dotfiles"}]},"timeToRead":3,"fields":{"slug":"/2018/01/13/wsl-bootstrap/","editLink":"https://github.com/spences10/thelocalhost.blog/edit/authoring/posts/2018/01/13/wsl-bootstrap/index.md"}}},"pageContext":{"slug":"/2018/01/13/wsl-bootstrap/","previous":{"id":"0ead006c-347e-5884-ae54-8c2ada5bed30","excerpt":"How to combine two separate unrelated Git repositories into one with\nsingle history timeline. Just adding a quick note on this… I had a project that started off as it’s own project but it ended up\nneeding to go into an already existing project, so I…","frontmatter":{"title":"Git ` — allow-unrelated-histories`","date":"2017-06-30T00:00:00.000Z"},"fields":{"slug":"/2017/06/30/git-allow-unrelated-histories/"}},"next":{"id":"765e6590-f837-5529-bd2a-ee51739a0340","excerpt":"Life moves pretty fast. If you don’t stop and look around once in a\nwhile, you could miss it. — Ferris Bueller. I'm going to go over steps I have taken the help me with learning to\ncode ( again ) But fist,  preamble: Let’s pick up a new skill, get a…","frontmatter":{"title":"How to make time for 100 days of code","date":"2018-02-27T00:00:00.000Z"},"fields":{"slug":"/2018/02/27/make-time-for-100doc/"}}}}}