My WSL Setup

Created: 2021-01-16

If Windows Subsystem for Linux had existed about five years ago (say 2016), I wonder if I would have even bothered switching my full-time desktop to Slackware Linux?


I’m glad I made the switch in every single way except one: PC gaming. Linux gaming has made huge strides in the last couple years (thanks to Wine and Proton and other efforts) and when it works, it works beautifully. I also love GamerOS, which runs Steam as the main UI (which I have installed on one of the family computers).

But when things (especially hardware) don’t "just work", the pain is tremendous. The final straw for me was when Steam suddenly started crashing my PC when I attempted to launch it. (My theory is that a Steam update may have included something new which activated the kernel module-level bug I experienced with my Radeon video card. [Note to self to upload my notes for my solution to that].)

My setup

I installed/activated WSL and installed the Debian WSL "app".

On the Debian instance, I used apt update and then apt install to get some of the basic tools I’m used to having (like Vim). I’m used to Slackware which comes with everything, so having to install even things like man is funny - but makes absolute sense in terms of keeping the base WSL distros as light as possible.

Next, I installed Syncthing (sudo apt install syncthing) and used my neat little SSH port forward trick to access the Syncthing web interface for both the local (running on Debian WSL) and remote (a headless FreeBSD file server elsewhere in the house) and setup my standard ~/sync directory.

Once that was done, all my files were available in the Debian WSL instance as they would be on any of my Linux desktops.

Then I ran my little sync/dotfiles/ script that creates symlinks to the "dot files" (e.g. .bashrc) I keep synced across machines.

One of the dotfiles is .bash_profile (login shell) which contains my neato Syncthing startup script). So every time the Debian WSL starts up, Syncthing is also started.

Poof! Like magic, now I’ve got everything setup just like I like it.

I’m editing this very web page in Vim on a Debian WSL instance. In a moment, I’ll run the script (Bash) that converts the page (another script, Ruby this time) and uploads the changes to with rsync. Then I can switch over to Steam and play some Kerbal Space Program.

After a while I forget I’m even on Windows.

Mute the terminal bell!

Having Bash and Vim bells producing a "Windows error" sound ever few minutes while using WSL got old real fast. Muting the console host worked beautifully for me as per the suggestion on this issue. Scroll down to the screenshot that accompanies this quote:

"Open Volume Mixer by right clicking on the Volume Control in the Windows taskbar and mute the Console Window Host."

Really happy with this setup

For a multi-use "family" computer, this really is a "best of both worlds" situation. I feel like I can do absolutely anything on this desktop.

My other computers will continue to run Linux.

Access WSL Filesystems

In the Windows File Explorer, enter the location \\wsl$. Any WSL distros will be listed. Open 'em up and there’s the root of the Linux filesystem. Nice!