This guide covers the setup of essential development tools on WSL2, including Docker, VSCode, and Zsh with Oh My Zsh.
-
Enable Virtualization in BIOS
- Follow the instructions here.
-
Enable Windows Features Open the start menu and search for "Turn Windows features on or off". Ensure the following options are checked:
- Hyper-V
- Windows Subsystem for Linux (WSL)
-
Install & Update WSL
wsl --install wsl --updateNote: Skipping this step may result in errors when starting Ubuntu.
-
Check WSL Version
wsl --versionExample output:
WSL version: 2.6.3.0 Kernel version: 6.6.87.2-1 WSLg version: 1.0.71 MSRDC version: 1.2.6353 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26200.7781
-
Install Ubuntu
Note You might need to restart your pc before runing this command
wsl --install -d Ubuntu
-
Update and UPgrade Packages
sudo apt-get update sudo apt-get upgrade -
Install Essential Packages
sudo apt-get install build-essential procps curl file gitNote: This includes GCC and other build utilities.
-
Install Brew
- Follow the instructions here.
- Add Brew to your shell environment:
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc -
Install Zsh and Oh My Zsh
brew install zshsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"Follow the instructions here to complete the installation.
-
Set Zsh as the Default Shell
- Follow the instructions here:
command -v zsh | sudo tee -a /etc/shells chsh -s $(which zsh)
- Logout and login again to apply the changes.
- Follow the instructions here:
-
Install Docker
brew install docker
-
Install AWS CLI
brew install awscli
-
Install OneLogin
- Clone CO onelogin
git clone git@github.com:kna-core/cloudops-onelogin.git cd cloudops-onelogin- Follow the instruction for Debian
sudo apt update sudo apt install python3 python3-pip
- Ensure you have the necessary python libraries like setuptools or install it with pipx
brew install pipx pipx inject onelogin-aws-cli setuptools
-
Install nvm, goenv and venv( python )
- Install nvm and goenv with brew:
brew install nvm brew install goenv
- For Python versioning (venv ) please follow this link: https://docs.brew.sh/Homebrew-and-Python#pep-668-and-virtual-environments
-
Install Chocolatey / windows packet manager (Optional)
- Run
Get-ExecutionPolicy. If it returns Restricted, then runSet-ExecutionPolicy AllSignedorSet-ExecutionPolicy Bypass -Scope Process. - Ensure PowerShell has the necessary permissions before this:
- Install as Admin using PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Note more details here here
- Run
-
Install Windows tools with
chocopacket managerchoco install git choco install docker-desktop choco install vscode choco install microsoft-windows-terminal choco install slack choco install puttyNote Configure docker-desktop: in Settings > Resources> WSL integration ensure the "Enable integration with my default WSL distro" and "Ubuntu" is active
-
Windows tools optional:
choco install googlechrome choco install brave choco install powertoys