How to run openSUSE Leap 42.2 or SUSE Linux Enterprise Server 12 on Windows 10

opensuse

Linux and Windows living happily side-by-side is not something many people would have predicted, but Windows 10 Anniversary Update saw the arrival of Bash on Ubuntu thanks to the Windows Subsystem for Linux. Not everyone was happy with Microsoft's choice of Ubuntu, with many preferring a different flavour of Linux.

Senior Product Manager for SUSE Linux Enterprise, Hannes Kühnemund, is -- unsurprisingly -- one of those whose taste buds were not tantalized by Ubuntu. He would rather you ran SUSE on Windows 10. In fact he doesn't just want this to happen, he tells you how to do it -- specifically with openSUSE Leap 42.2 and SUSE Linux Enterprise Server 12 SP2 -- so you too can run Linux binaries natively on Windows.

Kühnemund writes: "it's quite unfortunate that Microsoft enabled the wrong Linux (that's my personal opinion) by default within the Windows Subsystem for Linux (WSL) and it is time to change it to the real stuff".

  • Enable the Windows Subsystem for Linux (WSL): A great step-by-step guide can be found here: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide. During the install you will need to create a non-root user and password. I’ll refer to this user as <linux_user> in the next steps.
  • Download the openSUSE docker userspace:

$ wget -O openSUSE-42.2.tar.xz https://github.com/openSUSE/docker-containers-build/blob/openSUSE-42.2/docker/openSUSE-42.2.tar.xz?raw=true

  • Open the bash shell, which you find in your Windows Start menu under “Bash on Ubuntu on Windows” (click the Windows button, type “bash” and then hit Enter). True, it’s still Ubuntu but we only need to run a few commands there before we can replace it.
  • Extract the openSUSE userspace (ignore any warnings) and exit the bash shell:

$ sudo mkdir rootfs
$ sudo tar -C rootfs -Jxf openSUSE-42.2.tar.xz
$ exit

  • Backup the old rootfs (Ubuntu) and copy the new openSUSE rootfs. Open a Command Prompt window (Windows key, enter “cmd” and hit Enter) and run the following commands:

cd %localappdata%\lxss\
rename rootfs rootfs.ubuntu
move .\home\<linux_user>\rootfs .\

  • The new openSUSE userspace will, of course, not include the user that you created when you installed Bash for Windows, nor does it have things like ‘sudo’. To start just set ‘root’ as the default user. While still in the Command Prompt window run the following:

lxrun /setdefaultuser root

  • When exiting the command prompt, start bash from the start menu (Windows key, enter “bash” and hit Enter) and you have your openSUSE Leap 42.2 environment running within WSL.

Check out Kühnemund's blog post for the full guide, and take a browse through the comments for hints, tips and suggestions from others who have tried it.

2 Responses to How to run openSUSE Leap 42.2 or SUSE Linux Enterprise Server 12 on Windows 10

© 1998-2024 BetaNews, Inc. All Rights Reserved. Privacy Policy - Cookie Policy.