You can now install SUSE Linux distribution inside WSL on Windows 10

With the Windows Subsystem for Linux (WSL), you can now run Linux binaries natively on Windows 10. With WSL, you can now run native Bash on Ubuntu on Windows. You can now run Bash scripts, Linux command-line tools like sed, awk, grep, and you can even try Linux-first tools like Ruby, Git, Python, etc. directly on Windows. You can also access your Windows filesystem from within Bash allowing you to work on the same set of files using your preferred Windows tools or Linux command-line tools. Microsoft partnered with Ubuntu to bring their Linux version to Windows natively.

If you prefer SUSE Linux distro, you can now install it on Windows 10 as well. You have currently two options, openSUSE Leap 42.2 and SUSE Linux Enterprise Server 12 SP2. Below are the simple steps you have to follow to install a SUSE Linux distribution inside WSL.

  • 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.

  • Now let’s also change the orange icon to a cool green one. The one I’m using is coming from iconarchive.com and can be found through this link: http://www.iconarchive.com/show/nuoveXT-icons-by-saki/Apps-suse-icon.html
    Download the .ico file and copy it to %localappdata%\lxss\. In a command shell execute the commands (or simply use Windows Explorer, whichever suits you best):

    cd %localappdata%\lxss\
    rename bash.ico Ubuntu.ico
    rename Saki-NuoveXT-Apps-suse.ico bash.ico

Some links in the article may not be viewable as you are using an AdBlocker. Please add us to your whitelist to enable the website to function properly.

Source Via Related
Comments