Setup Windows 10 for Modern/Hipster Development
A fresh Windows isn't entirely ready for modern development, but all the tools you need are available. A good terminal, popular bash tools, Git, a decent package manager - when properly setup, modern development on Windows can be a lot of fun. In particular, this document outlines how to configure your Windows in such a way that it can easily handle most development tasks usually run on a Mac OS X or a Linux distro.
A Word about Ubuntu Linux on Windows
- Ensure that you're running Windows 10 Anniversary Update (build 14311 and up)
- Enable Developer Mode (Settings - Update & security > For developers)
- Search for “Windows Features” and choose “Turn Windows features on or off” and enable Windows Subsystem for Linux.
- To get Bash installed, open Command Prompt and type “bash”
Below, you can see the all the things I need to actually go and work on stuff. If you like all those things, you can automate the installation thanks to the magic of Boxstarter. Simply start PowerShell as Administrator and run:
- Package Management
- Bash Tools
- Atom, Sublime, VS Code
- DevOps: VirtualBox, Vagrant, Docker
- Basic Tools
Package Management: Chocolatey
Chocolatey is a powerful package manager for Windows, working sort of like apt-get or homebrew. Let's get that first. Fire up CMD.exe as Administrator and run:
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Once done, you can install packages by running
cinst (short for
choco install). Most packages below will be installed with Chocolatey.
Bonus: Use Windows 10 & OneGet
Windows 10 comes with OneGet, a universal package manager that can use Chocolatey to find and install packages. To install, run:
Get-PackageProvider -name chocolatey
Once done, you can look for all Chrome packages by typing
Find-Package -Name Chrome or install it by typing
Install-Package -Name GoogleChrome.
Terminal: CMDer (with PowerShell Support)
The PowerShell in Windows 10 got a bunch of upgrades, but it's even better if used with CMDer or Hyper, both powerful tools to do more command-line things with. CMDer is the old-school veteran, while Hyper hasn't been around for long. Try both and see what you like more! I personally prefer Hyper, simply because it can be styled and extended with addons. Install with:
cinst cmder -pre cinst hyper
Even if you don't want to use either, you should enable your PowerShell to execute scripts. You're a developer - the terminal is your friend.
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
If you want to go even further, check out the attached PowerShell Profile in this repository. It's my personal one and might not be perfect for you, but it makes my personal life a lot easier. You can edit your PowerShell profile with your favorite editor by calling
$PROFILE, so if you're using Visual Studio Code, call
code $PROFILE (or
vim $PROFILE - you get the idea).
Bash Tools (wget, curl, etc): Gow
If you're coming from a Unix machine, you might miss commands like curl, diff, grep and many other. Gow is your friend - it's a collection of a 100+ famous Unix tools recompiled for Windows.
A bunch of tools are powered by Node and installed via npm. This applies to you even if you don't care about Node development. If you want to install tools for React, Azure, TypeScript, or Cordova, you'll need this.
You just installed Node, which means that you also installed a slightly outdated version of npm. npm@3 is currently in development and offers a bunch of benefits for Windows users. You probably want to upgrade to npm, at least version 5.6.
npm install -g npm-windows-upgrade npm-windows-upgrade
Version Control: Git, Subversion, Mercurial
Obviously. If you want Git to be able to save credentials (so you don't have to enter SSH keys / passwords every single time you do anything), also install the Git Credential Manager for Windows.
cinst git.install cinst poshgit # Restart PowerShell / CMDer before moving on - or run $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") cinst Git-Credential-Manager-for-Windows cinst github
If you're using Mercurial or Subversion, install with:
cinst subversion cinst mercurial
Code Editors: Atom, Sublime, VS Code
I won't join the war debating which editor is the best, but if you're looking for an editor and not a full IDE, chances are that you'll end up using one of those three.
cinst SublimeText3 cinst sublimetext3-contextmenu cinst SublimeText3.PackageControl cinst SublimeText3.PowershellAlias
Visual Studio 2017
If you already own Visual Studio, you should obviously install the version you bought with your precious money. If you don't, do know that Visual Studio 2017 Community Edition is free (for most people).
If you have development needs that require an older version, Visual Studio 2015 Community Edition can be installed with this command:
Even if you don't care about Ruby at all, bear in mind that it's preinstalled on OS X (and easy to install on Unix), so many dev tools might be trying to leverage it. For example, GitHub pages are compiled using Jekyll - if you want to get in on that, install Ruby.
cinst ruby cinst ruby.devkit
Rust development on Windows is fantastic. I applaud the whole community for their cross-platform efforts. To get started, install
rustup, the official installer for Rust. The easiest way to aquire it is to download it directly from the homepage.
rustup allows you to install so-called "Rust toolchains". I personally use the nightly one (because that's how I roll; but also, because many libraries require it):
rustup install nightly-msvc rustup default nightly-msvc
From this point on forward, you can install additional Rust tools to make development easier with
Sure, why not.
Python is a complex world with a bunch of flavors, but Python 3, pip, and easy_install should have you prepared for most things.
cinst python cinst pip cinst easy.install
If you intend to work with Node.js, know that compiling native Node modules usually requires Python 2.7 instead of Python 3. For Node development, do not install Python 3 - instead, run these commands:
This stuff is really only relevant if you're interested in DevOps - but if you are, you should probably install the stuff below. It's not likely that you need any of the things below unless you're directly working with it, because none of those things are expected to be installed on a Unix machine.
Docker, VirtualBox, Vagrant
If you want to run Docker machines and images, you might not need VirtualBox. In fact, installing VirtualBox on your system isn't always the best idea, given that it messes with a few system components.
Docker released a version for OS X and Windows that no longer requires VirtualBox to be installed - and instead uses the default Hypervisor that comes with the operating system (on Windows, that's Hyper-V). You can read more about it over in Docker's documentation.
However, if you want the old VirtualBox route, go and install that stuff with:
cinst virtualbox cinst virtualbox.extensionpack cinst vagrant
If you installed CMDer or Gow as indicated above, you're already set - simply run
ssh from CMD, CMDer, or PowerShell. If you haven't and you're running at least the Windows 10 Fall Creators Update, know that OpenSSH is now an official Windows feature. Install it from PowerShell with the following commands:
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*' # The above command should return something that looks like this: # Name : OpenSSH.Client~~~~0.0.1.0 # State : NotPresent # # Name : OpenSSH.Server~~~~0.0.1.0 # State : NotPresent # Then, knowing the version numbers: # Install the OpenSSH Client Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 # Install the OpenSSH Server Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Alternatively (and for older versions of Windows), install the official Microsoft port of OpenSSH directly:
Super duper useful if you're working with Azure at all.
Super duper useful if you're working with Amazon Web Services at all.
cinst awscli cinst awstools.powershell
You'll recognize many of these names. Nothing here is crazy unique, it's just stuff you probably want installed to have a well-running machine.
cinst vlc cinst GoogleChrome cinst 7zip.install cinst sysinternals cinst DotNet3.5
If you're not running Windows 10, also install:
cinst DotNet4.0 -- not needed on windows 8 cinst DotNet4.5 -- not needed on windows 10 cinst PowerShell -- not needed on windows 10