Enable Windows Subsystem for Linux (WSL)
1. Prerequisites
WSL requires Windows 10, Version 1903 or higher, with Build 18362 or higher, for x64 systems, and Version 2004 or higher,
with Build 19041 or higher, for ARM64 systems
To find your machine's architecture and Windows version/build number go to:
2. Enable the Windows Subsystem for Linux feature
3. After enabling Windows Subsystem for Linux, restart your computer when prompted
4. Install your Linux distribution of choice
5. Create a UNIX user
the first time you launch a Linux distribution in Windows, you will be prompted to create a UNIX username and password.
this UNIX username and password has no relationship to your Windows username and password, so to avoid any confusion use a different username
(example: utalarico)
6. Update the Linux distribution
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y
The -y flag signifies automatic yes to any prompts that may come up in the command line
7. Accessing the Windows filesystem from WSL
ln -s /mnt/c/Users/<windowsusername> ~/winhome
(example of windowsusername: claudio)
8. Starting up WSL
in general, to start using WSL, open up a PowerShell terminal and type wsl. If you’ve set up WSL correctly, you’ll enter a bash terminal running on
the WSL distro of choice. From here, you can run any Linux commands you wish.
in our specific case, since we have installed mobaXterm we can also start the WSL terminal through MobaXterm
9. WSL and Graphical Applications
in bash run:
echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
and then to have the configuration changes take effect, restart the bash or run:
|