Installing the Windows Subsystem for Linux
On a Windows system, the simplest solution is to use the Windows Subsystem for Linux (WSL), available on Windows 10. With it, we can have an Ubuntu system running inside Windows, capable of performing everything we need for Odoo development. More information on the WSL can be found at https://docs.microsoft.com/en-us/windows/wsl/about.
The WSL is a Windows 10 optional feature, available in recent builds, and must first be enabled. After that, we should install Ubuntu from the Windows store. The official instructions for that are at https://docs.microsoft.com/en-us/windows/wsl/install-win10.
At the time of writing, these are the steps needed to complete the installation:
- Our first step is to ensure that the WSL optional feature is enabled. Open PowerShell as administrator and run the following:
Enable-WindowsOptionalFeature -Online -FeatureName
Microsoft-Windows-Subsystem-Linux
The preceding command should be typed in a single line. Then, restart the computer when prompted.
After this, we should install the Ubuntu Windows app. The simplest way to do that is to open the Windows store and search for Ubuntu. When writing this book, we used the latest Ubuntu long-term support (LTS) release, 18.04. Follow the installation process, including setting up a user account and corresponding password.
Running the Ubuntu application will open a Window bash command line where we can perform the same commands we would use on an Ubuntu system. Remember the user and password configured during the Ubuntu installation, since they will be prompted for whenever you need to perform actions with elevated privileges (for example, running sudo).