You can now install SUSE Linux distribution inside WSL on Windows 10
3 min. read
Updated on
Read our disclosure page to find out how can you help MSPoweruser sustain the editorial team Read more
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.
- 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
- 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
User forum
0 messages