Skip to main content

My Basic Webdev WSL setup

install

# install wsl
wsl --install

# list available distros
wsl -l -o

# install ubuntu
wsl --install Ubuntu-24.04

# run specific distro and user
wsl --distribution <Distribution Name> --user <User Name>

first commands

install must haves

# update and installs
sudo apt update && sudo apt upgrade
sudo apt install git curl net-tools dnsutils

git

git config --global user.name "Your Name Here"
git config --global user.email your@email.example

ssh

## generate pub/private keys
ssh-keygen -C "{short description}"
## or paste keys and check permissions
sudo chmod 400 ~/.ssh/id_ed25516
## add configs
nano ~/.ssh/config

docker

curl -sSL https://get.docker.com/ | sh
## put user into docker group
sudo usermod -aG docker $USER
newgrp docker # to add docker in your current shell session
## docker deskotp not necessary -> not free
docker ps

zsh

if -f ~/.zshrc; then
  echo "Installing zsh with oh my zsh and powerlevel10kTheme"

  sudo apt update && sudo apt install curl git zsh
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
  git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
  sed -i '/ZSH_THEME="/c\ZSH_THEME="powerlevel10k/powerlevel10k"' ~/.zshrc
fi

java

sudo apt-get update
sudo apt-get install curl zip unzip
curl -s "https://get.sdkman.io" | bash
# source "$HOME/.sdkman/bin/sdkman-init.sh" # or reopen the terminal
 
sdk list java
sdk install java 25.0.3-tem # latest lts version of eclipse, best alternative would be amzn corretto
sdk default java 25.0.3-tem

node

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
# reopen the terminal
nvm install --lts
nvm use --lts

pnpm

sudo apt-get install -y libatomic1
curl -fsSL https://get.pnpm.io/install.sh | sh -
# reopen the terminal