This is a fully step-by-step guide comes with installation file from my original repository
WSL 1: Windows Build 16215 or later.
WSL 2: Windows Builds 18917 or higher. (Updated May 14th 2020, WSL 2 is not offically published so you need to join Insider to enable the features).
You can check your Windows version from powershell with command like this:
systeminfo | Select-String "^OS Name","^OS Version"
In my opinion, you should update the windows to the latest, this helps alot.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
WSL 2: Do the same thing as WSL 1 but add one more: ( MAKE SURE YOU ARE ALREADY IN INSIDER PROGRAM ).
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Open Microsoft Store and search for keyword "WSL". You can download Ubuntu16, Ubuntu18, Ubuntu20,... Up to you. After downloading, a ternimal will pop-ups, enter your username and password. Then done.
Open Powershell or CMD and type:
wsl --set-default-version 2
Then do the same thing as WSL 1 and done.
Step 3: This is my personal setup. I have made it easier just in a single file. All you have to do is download the *set_up.sh and run:
./set_up.sh
chmod +x set_up.sh
what is going on in my set_up.sh:
We are going to update and upgrade to the latest.
Then to set up GIT ( in this set up, i am going with github.com, i will update with more options ).
You have to add your username, email and go to github, manually add ssh key then check the connection.
OR just skip my GIT set-up
I will add more options in future like GPG keys instead or many reposities like heroku, bitbucket, gitlab, ...
In this installation, i am gonna set up with my personal configuration and also with plugins.
I'm kind of in love with neovim at the moment but i will definitely try other editors and add more options in future.
One more things, you can install vscode in Windows and call it from WSL. Microsoft has done a wonderful this for developers.
In this installation, there are:
Bash-it from github.com/Bash-it/bash-it
OhMyZSH from github.com/ohmyzsh/ohmyzsh
I prefer Bash-it because i did more personal config in .bashrc file than in .zshrc .
WSL need X-server for GUI. Check this link for detailed discussion about GUI on WSL 2: Link
Audio is not supported at the moment but can be handle with pulseaudio. Check this out: Link
- This will give you some option to choose ip ( in my case is opt 4, it works perfectly for me )
set_up_ip
- Run xming as default
open_xserver
- Run x-launch with config+file. If config_file does not exist, a pane will popups.
open_xserver config_file
- Run pulseaudio. Click any keys to return.
open_pulseaudio
- Kill x-server process from cmd
kill_xserver
- Kill pulseaudio from cmd
kill_pulseaudio
- Check if x-server or puslseaudio is running
check_xserver
check_pulseaudio
I prefer OhMyTmux from: github.com/gpakosz/.tmux