Above all, all the content is a very concise version of the official installation guide. https://docs.azul.com/zulu/zuludocs/ZuluUserGuide/Title.htm

Install zulu by apt.

# Import Azul's public key.sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9# Download the installation package from the Azul Systems site https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-2_all.deb.# Install the downloaded package by running the following command in your terminal:
sudo apt-get install ./zulu-repo_1.0.0-2_all.deb
# Update the information about available packages.
sudo apt-get update
# Install a Zulu package.
sudo apt-get install <zulu_package_name>
# Example:
sudo apt-get install zulu11-jdk

We could install multiple java versions by using above apt-get install command.

How to switch between multiple java version?

sudo update-alternatives --config java



There are a lot of libraries need to be install in ubuntu 20.04 wsl version. Without them, pyenv install x.x.x will failed at compiling python.

Run the following to install necessary libraries.

sudo apt-get update; sudo apt-get install — no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Then install pyenv.

curl https://pyenv.run | bash

Restart your shell so the path changes take effect:

exec $SHELL



First we install xrdp, xfce4 and edit xrdp.ini file by running the following scripts.

sudo apt install xrdp
sudo apt install xfce4 -y
sudo apt install -y xfce4-goodies
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
sudo vim /etc/xrdp/xrdp.ini
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
echo xfce4-session > ~/.xsession

Then edit the file /etc/xrdp/startwm.sh

sudo vim /etc/xrdp/startwm.sh

Now comment out the last 2 lines and add a new line like below:

# test -x /etc/X11/Xsession && exec /etc/X11/Xsession
# exec /bin/sh /etc/X11/Xsession

Finally start the service.

sudo /etc/init.d/xrdp start



If we get the following error message:

Error saving credentials: error storing credentials — err: exec: “docker-credential-desktop.exe”: executable file not found in $PATH, out: ``

It could be solved by:

sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-credential-desktop.exe /usr/bin/docker-credential-desktop.exe



While trying to vs code in wsl 2 Debian, I found this:

$ code .
$ -bash: code: command not found

To solve this problem, simply add a soft link to /usr/local/bin.

sudo ln -s /mnt/c/Users/{replace with your username}/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code /usr/local/bin/code

That’s it!