- Notes before you start
- Make your Windows fast
- Enable developer mode
- Install chocolatey
- Install Git and other basic softwares
- Setting up Windows Terminal for development
- Install Windows Subsystem for Linux (WSL)
After a smooth upgrade to Windows 10 2004 May 2020 edition, I can finally conclude that this is all a developer needs. A Windows environment for writing programs in Windows and a Linux kernel to write programs in Ubuntu (which can also be almost shipped to MAC-OS X).
Finally this makes Windows the best developer platform. But, this setup doesn't come by default. Not all Windows users are developers after all (well, most of them are not). Therefore, this post will serve as a go-to guide for all the developers out there to setup the perfect Windows development environment for all kinds of development.
- If you don't have Windows this guide is not for you.
- You might need a good internet connection. You might spend around 3-4 GB of data during this process. But its a one time thing, so don't worry.
- This is a highly opinionated guide. Comments are welcome.
- This guide will be for fresh installation of Windows. But you can still follow the guide even if you have various tools installed.
- If you have a pirated copy of Windows. Well. Activate it. Its important! :P
- This article will keep on getting updated with time. So, its not constant. This is a reference guide kind of article for users who need to make Windows suitable for developers.
This is a highly opinionated section. I am not a pretty big fan of the GUI and stuffs. I like to keep it minimal so as to make Windows run faster. Windows is indeed a heavy operating system. This helps me not worry about performance while working (which I do most of the time.). Let's see how we can make our Windows fast.
Uninstall all the anti-virus softwares and enable Windows defender. I won't go in very details into this topic. As a developer you can be in peace with Windows Defender which is just fantastic. For more information on how to do it, checkout: TechAdvisor - Do you need an antivirus?
Enable Windows Defender Windows 10
Disable startup programs. You can disable all the startup programs using the Task Manager:
a. Simply press:
Ctrl+Shift+Esc. It opens up the Task Manager.
b. Then open
c. Disable everything. I have disabled all the third-party updaters and everything. Docker, Slack, Adobe, OneDrive, GDrive, Sound and Graphics Driver utilities, etc. Disable them all. Start them manually only when you need it. Don't worry. It won't do any harm to your PC. I have done it and I am at peace.
Disable special effects and themes: This is optional as people like to have a sexy looking animation and themes on Windows. I actually prefer to have a simple one. Let's see how we can do it.
Win + I. (Open Windows settings)
b. Go to
Personalizationand then select
Make Start, taskbar and action center transparentin old versions of Windows 10. In the latest version, deselect the options under
Show accent color...
d. Close the settings window.
e. Right click on the Start menu and select *Advanced System settings
. InVisual Effects
tab, selectAdjust for best performance
. That's it. Animations will be off but performance gets a slight boost.Win + I` key).
f. Now, open settings again. (
Lower your resolution.. This is optional but a guaranteed hack to make your PC fast. So, if you are ready to sacrifice a tad-bit of resolution for faster workflow. Do it.
a. Go to
Systemoption and then
b. Scroll down to display resolution. change it to
1366 x 768or nearby.
1980x1080will make your laptop slower if your resolution is high.
Still if you are facing issues refer to this link: CNET - Speed up windows 10
Performance tuning is over. Now, we have to enable Developer mode to run a few applications meant for developers like Windows Subsystem for Linux. Follow the instructions:
Win + Ito open Windows settings.
- Go to
Update & Security.
- Go to
For Developerssection on the left menu bar.
Developer mode. Wait for sometime. This might take a while. After the loading finishes. Move on to the next step.
Chocolatey is a simple package manager for Windows that helps install necessary software on a Windows machine. For installing Chocolatey:
- Start menu
powershell. Right click on it. And
more > Run As Administrator.
- Type in the following:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
This will download Chocolatey and install it
- Test the installation:
- Install gsudo. (gsudo acts like
sudocommand for linux i.e. it gives admin privilege to your commands)
choco install gsudo
- From now on we will extensively use chocolatey and gsudo.
We will now install a lot of softwares required for development:
- First we need to install chocolatey as in the last step.
- Then simply paste the following code:
gsudo choco install git visualstudio2019buildtools microsoft-windows-terminal vscode notepadplusplus.install
- This might take time depending on your PC and internet connection. This is most of the software you will require.
- Once it's done. You will have the following softwares on your platform:
- Git: Version control. Probably you will use git more than ever.
- Visual Studio Build Tools 2019: Build tools for running native applications. If you are a python/nodejs user, you might feel this is necessary. In fact. you will realize its necessity one day or the other.
- Python: Many tools/build-scripts are written with Python. Even if you will never code in Python in your life, this will still be of use somewhere or the other.
- Microsoft Windows Terminal: The best terminal in the world!
- VSCode: This is an opinionated choice, but well! Its awesome to it core.
- Notepad++: This acts like a perfect replacement for Notepad plus lots of features. Its super fast too! It lies somewhere in between the heavy VSCode and Notepad.
- Open powershell and type in:
cd $USERPROFILE git clone https://github.com/kerol2r20/Windows-terminal-context-menu cd Windows-terminal-context-menu gsudo .\SetupContextMenu.ps1
- You have the Windows Terminal installed in your context menu. Right click on any file or empty folder space in Windows Explorer.
- Next open Windows Terminal and click on the downward facing caret icon on top and then select settings.
- Copy and paste all the contents of this Github Gist in the
settings.jsonfile that opens up in Notepad or VS code.
This is the whole freaking Linux on your Windows. Yes. You heard it right.
WSL 1.0 is more of an simulated environment for Linux running on Windows NT kernel. But WSL 2.0 ships with a full Linux kernel!
We are going to install WSL 2.0. Let's get started.
Update Windows to 2004 edition.
a. Yes! For WSL 2.0, you need to update Windows 10 v2004 May 2020 edition. For manual update, download the updater Windows May 2020 Update And follow the screen instructions.
b. Update done? Restart your Windows and come back to this dev post.
a. You computer also needs to support Hyper-V Virtualization to run WSL 2.
b. To enable Hyper-V, open Powershell and type in:
gsudo Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
d. Restart your PC after the last command.
There are two ways to intall WSL in Windows. First is through the Windows store. Windows Store is a bit tedious and really bad. Although it works fine for me. Anyways, we are going to install
WSLwithout Windows Store.
a. Go to WSL install manual.
b. Download the distro of your choice from the links. We are going with Ubuntu 20.04.
c. An .appx will be downloaded.
d. In the folder where the distro is downloaded, simply open up terminal as we have done in the previous section.
e. Now put in the following code:
In my case the name of the distro is
f. Now once your installation is done, in the same terminal put:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
g. Restart your machine.
h. Now open terminal (wherever you like) and type:
wsl --set-default-version 2
That's it! From start menu open up Ubuntu.
There will be more to come. But I am hoping this will keep you from being a happy developer for now!
Looking forward to reactions in the comments section.