Windows
Windows Development Environment for Software Engineers¶
How to set up a development environment on Windows 11
Install Windows Terminal¶
Open Microsoft Store and search for Terminal and install it
Install WSL¶
create the file C:\Users\<user>\.wslconfig with the following content:
Open Powershell in Windows Terminal and run the wsl commands
wsl --install # Install WSL, a reboot is often required afterwards
wsl --install -d Ubuntu-24.04 # Install Ubuntu
wsl --setdefault Ubuntu-24.04 # Set Ubuntu as the default shell
wsl -l -v # Check it's set correctly
Configure Windows Terminal¶
In Windows Terminal press Ctrl+, to open the settings
Set Ubuntu as the default shell in the settings
Configure WSL¶
In WSL create /etc/wsl.conf
Note
The [boot] section only works on Windows 11
Some VPNs require a different MTU size that can be set in the boot command section
WSL welcome message¶
Silence the welcome message in WSL
Configure SSH¶
In WSL add a folder in the home directory
add your public and private SSH key files
and set the access control on the files
Install Keychain SSH Agent¶
In WSL
and configure Keychain to start when WSL launches
in ~/.profile add the following line
Configure bash prompt¶
Find the PS1 section in ~/.bashrc
add the git ps1 settings and the PS1 prompt
GIT_PS1_DESCRIBE_STYLE='contains'
GIT_PS1_SHOWCOLORHINTS='y'
GIT_PS1_SHOWDIRTYSTATE='y'
GIT_PS1_SHOWSTASHSTATE='y'
GIT_PS1_SHOWUNTRACKEDFILES='y'
GIT_PS1_SHOWUPSTREAM='auto'
if [ "$color_prompt" = yes ]; then
PS1='\[\e[0;32m\]\u\[\e[0m\]:\[\e[0;36m\]\w\[\e[0m\]$\[\e[0m\] \[\e[0;33m\]$(__git_ps1)\n\[\e[0m\]λ\[\e[0m\] \[\e[0m\]'
Note: the above PS1 setting is a personal preference
Install VSCode¶
Download and install VSCode from code.visualstudio.com
Open VSCode and install the extension Remote - WSL from microsoft
Open the WSL shell and run