Open Windows Commandline with administrative privileges, and run the following:
wsl --install
This command activates the features required to run WSL and installs the Ubuntu distribution of Linux
After the installation:
- Open Ubuntu via the menu context
- As UNIX username i recommend your company abbreviation
- Set a secure password
Update your distribution:
sudo apt-get update
sudo apt-get dist-upgrade
Create project folder:
mkdir projects
Hide last login time:
touch .hushlogin
Install Unzip:
sudo apt-get install unzip zip
Download and install SDKMAN:
curl -s "https://get.sdkman.io" | bash
Next, open a new terminal or enter:
source "$HOME/.sdkman/bin/sdkman-init.sh"
Install OpenJDK:
sdk install java 17.0.7-ms
Download and install NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
Enter to complete:
source "$HOME/.nvm/nvm.sh"
Install Latest Node.js Version:
nvm install --lts
Replace the placerholder below and paste it in your commandline:
git config --global user.name "Max Mustermann"
git config --global user.email "[email protected]"
Enter following command in your commandline:
nano .bashrc
Copy, paste and save the following lines:
alias update="sudo apt update && sudo apt -y upgrade"
alias build="sh gradlew build"
alias cleanBuild="sh gradlew clean build"
Enter following command in your commandline or open a new tab:
source .bashrc
cp -R /mnt/c/Users/Username/pathFromWindows ~/wishedWSLDestination
Run the command to see the list of available versions:
nvm list-remote
Run the command to install your preferred version:
nvm install xx.x.x
Run the command to set your new default:
nvm alias default xx.x.x
Run the command to see the list of available versions:
sudo update-alternatives --config java
Open Windows Commandline with administrative privileges, and run the following:
wsl --update