Windows was the OS where I first wrote my very first programming lines, and although there was some back and forth between Windows, Linux and Mac OS throughout my carreer I’ve been extremely happy developing only in Windows in the past year.
In this blog post I will show how I setup my Windows development environment and what software / tools I use in my day-to-day.
A beautiful terminal with crispy fonts and good colors make your life much more enjoyable. The Windows Terminal solves all that and centralizes all different shells available in Windows: PowerShell, cmd, PowerhShell Core, WSL (more on the last two in a bit). It supports multiple profiles and color configuration, so you are able to setup one color for each shell, for example.
To install it simply go to the Microsoft Store, search for Windows Terminal and install it.
A good package manager is extremely neccessary in a development environment. In Ubuntu we can just
sudo apt install this, in Mac OS we can
brew install that but few people know that there are awesome alternatives in Windows as well.
I personally use scoop, but there is also Chocolatey and the newcomer winget (that is currently being developed and I’m excited to test!). Since I prefer scoop’s approach of not installing anything on admin and have user scoped installations I’ve been very happily using it. It has a simple command line interface and to install it you can enter the following line on Powershell:
iwr -useb get.scoop.sh | iex
Wait! The attentive reader would make sure the script is not malicious by checking the content of
get.scoop.sh before running the command on your machine.
Now to install git, for example, you can run
scoop install git. You can also install Windows Terminal through it as well.
From what I’ve seen
winget will have a very good integration with already installed software and also with the Microsoft Store, so once it is fully available I’ll certainly test it, but for now scoop has been serving me very well.
We’ve installed a terminal and a pakage manager, we are missing a code editor. For that I’ve been strongly relying on Visual Studio Code. It has a excellent support for Python and Jupyter that I use in my day-to-day. From the big range of available extensions I’m confident there might be something to cover your needs to. It integrates really nicely with WSL (we will talk about it a bit later) and remote development through SSH.
Now that you have scoop installed you can install VSCode by running:
scoop install vscode
By default Windows provides two alternatives already: cmd and PowerShell. The Command Prompt was the original shell for MS-DOS and was the default option until Windows 10. Two things I really liked about PowerShell when comparing with other shells are:
- “verb-noun” naming pattern that makes scripts more readable.
- You can handle objects, not only strings, so command pipelines are really powerfull.
PowerShell Core is the next generation of PowerShell, it is open source and it is currently receiving lots of new updates and improvements. So if you don’t have any hard dependency on Windows PowerShell, you should start to use PowerShell Core.
scoop install pwsh
Windows Subsystem for Linux 2
Gone are the days of having to setup a dual boot with Windows and Linux to be able to test something on Linux or install something that is not available in Windows. WSL let’s you run a Linux environment directly from Windows. So to access your Ubuntu installation, for example, you can just open your terminal and start working. You can easily setup WSL2 to work with Windows Terminal as well so you can have everything centralized.
To install it you can refer to this documentation.
Command Line Tools
Starship is a highly customizable command line prompt written in rust that is available in any shell.
To install it, as usual:
scoop install starship
You can learn how to customize and tweak it to your taste in the official docs.
Sometimes you are working in a big project that you don’t quite remember the folder structure. Or you just always have to fully type
cd ~/Workspace/blog to start writing a new blog post.
ZLocation tracks your most used directories, based on number of previously run commands and learns where you want to go. So instead of having to type
cd ~/Workspace/blog you can just type
You can install it by running:
Install-Module ZLocation -Scope CurrentUser
Windows does not have a sudo command. Some times you might want to run a command with admnistrator privileges and you need to open a new terminal as administrator. This might get boring real quick. You can install a sudo cmdlet that allows will to sudo what you wish just like in Linux.
scoop install sudo
That’s it for today. Hope you all enjoyed the post and let me know what interesting tools/software you have been using that I have missed. Maybe I can do a second post with suggestions? Until next time!