In my previous post, I explained Why Linux is the best development environment
Historically there were 3 ways to build a Linux development environment:
- your personal computer (local machine)
- computer in the cloud (cloud server)
- virtual machine (VM) on your personal computer
As of 2016 Microsoft lets developers run Linux environment directly on Windows, unmodified, without the overhead of a virtual machine, cost of a cloud computer, or possibly corrupting your local machine. You can:
- Choose your favorite Linux distributions from the Windows Store.
- Run common command-line free software such as
awk, or other ELF-64 binaries.
- Run Bash shell scripts and Linux command-line applications including:
- Tools: vim, emacs, tmux
- Services: sshd, MySQL, Apache, lighttpd
- Install additional software using own Linux distribution package manager.
- Invoke Windows applications using a Unix-like command-line shell.
- Invoke GNU/Linux applications on Windows.
The following steps will create a Linux (Ubuntu) development environment, hosted on a Windows 10 machine.
You must be on Windows 10 Pro 64bit build 1709.
1. Get the update here:https://www.microsoft.com/en-us/software-download/windows10
Enable Windows Subsystem for Linux
Before installing any Linux distros for WSL, you must ensure that the “Windows Subsystem for Linux” optional feature is enabled:
Open PowerShell as Administrator and run:
EptionalFeatnable-WindowsOure -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Restart your computer when prompted.
Installing Ubuntu 18.04 LTS on Windows
Open the Microsoft Store and choose your favorite Linux distribution.
Create a UNIX Username and Password
Once the installation is complete, you will be prompted to create a new user account (and its password).
Update and Upgrade
Most distros ship with an empty/minimal package catalog. We strongly recommend regularly updating your package catalog, and upgrading your installed packages using your distro’s preferred package manager.
$ sudo apt-get update && sudo upgrade -y