Setup Your Windows Devbox Like a Pro π»π©π§
This article follows the previous one where we have cried our Goodbyes to Docker Destop π.
Letβs now look at some base config you can start with when setting up you dev box for dev! Let us focus only on the base windows setup, which can be used as a foundation for any tooling specialisation.
If you are a developer, a frontend dev, backend dev, full stack or just want to know what should I have no my windows dev box as a starting point, then this article is for you.
For the best experience with Windows, before you begin experimenting and installing all sorts of tools, you are going to need some basics.
Get some soft!
First off, you will need some proper tools to use on Windows for development. These should be at the top of your list.
- Powershell Core 7 - This will give you a usable cross platform shell
- Windows Terminal - This will give you definitive terminal on windows
- Visual Studio Code - Best IDE these days
- IntelliJ Community - Best Java IDE these days
- Git for windows - Latest git
- Oracle JDK 8 and Oracle JDK 8 - You can download both and install and switch using your paths or java config tool
- Apache Maven - Needed to compile maven projects
- Sublime Text - Will allow you to edit files quickly
- Python - Run python scripts
- Node JS - Run node js app
If you cannot use Docker Desktop, you can just setup Docker in WSL and run it using your impressive Windows Terminal!
Once you have these tools set up, you should be able to contribute to most code projects.
Before you run off and get busy with code, you need to verify and do some windows config updates, these are not so obvious, but you will encounter these at some point.
Enable Long File Path Names in Windows
Then you going to have to enable Windows Long file names.
- Open up Windows Terminal as Administrator.
- Run the following command:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 0x1 /f
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies" /v LongPathsEnabled /t REG_DWORD /d 0x1 /f
- Test if settings have been applied
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem"
reg query "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies"
Enable Long File Path Names in Git
Now you are going to have to tell Git to use long file names, just in case it wonβt do it by default.
- Open up Windows Terminal as Administrator.
- Run the following command:
git config --system core.longpaths true
Now you can happily clone Linux/Unix repos that have very long paths!
Setup Environment Varibles
To get the best out of your shell, you need to set up some environment variables that will give you access to
- Run
sysdm.cpl
as Administrator and on the Advanced tab, clickEnvironment Variables
. - Add new Variable
JAVA_HOME
point toC:\Program Files\Java\jdk1.8.0_301
. - Add new Variable
M2_HOME
point toC:\software\apache-maven-3.8.4
(where you installed maven) - Under the
System Variables
selectPath
then clickEdit
- Under the
System Variables
clickNew
and add the following:- Variable name: JAVA_HOME
- Variable value: C:\Program Files\Java\jdk1.8.0_301
- Add the following new paths:
%JAVA_HOME%\bin
this will allow you to run java%M2_HOME%\bin
this will allow you to run mavenC:\Program Files\Git\usr\bin
this will allow you to run various Linux commands,sed
,awk
,grep
etc
- Click
Ok
to all the remaining dialogue boxes to save all the changes - Verify java is installed by opening Windows Terminal and running
java -version
- you should see a Java JDK version if all went well
After this, you should have the following paths in your command line path:
%M2_HOME%\bin
%JAVA_HOME%\bin
C:\Program Files\Git\usr\bin
Configure Docker
Create .wslconfig
in ~/
with the following content.
[wsl2]
memory=6GB
This will ensure that WSL will not use up all of your resources. See more on Advanced settings configuration in WSL.
Once you reboot, your WSL should behave, and you will be able to use it with nice tools! Let me know what else you think should be on the list!
Thank you
I hope you enjoyed this guide. If you have any questions or comments, feel free to contact me. I will be happy to help.
Let me know what you think and donβt forget to tell your friends.
Leave a Comment