DEV Community

Getting Up and Running with the Windows Subsystem for Linux

Sonny 🤔 on November 26, 2017

An exercise in futility This weekend I started tinkering around with the Windows Subsystem for Linux (WSL). I was mainly inspired to really st...
Collapse
 
jacoby profile image
Dave Jacoby • Edited

I like people talking about WSL. I have a lot of "real" Linux at my work, so I haven't spent too much time with WSL as my main development environment.

I can't help thinking that this tells us a lot more about how you use a Unix machine than how most developers would need to get WSL going.

I mean, there is nothing I'd want to run with a window from Linux that doesn't have an equivalent in Windows, so it's been probably more than six years since I've installed or used XMing, and none of the research clusters have fish, so it makes no sense for me to use it over bash, even if I need to have a 200-line .bashrc file.

Similarly, I've not built up a need for either tmux or screen.

I take a point back. Default term uses a standard library for text (USC-2) that came from the 80s and pre-exists Unicode, so using UTF-8 things in your prompt, like I do (I have the local temperature between time and path, with degree symbol), doesn't work in it so gnome-terminal in Windows is worth looking into.

Anyway, the suggestions I would make are more:

But still, thanks for this. I'll try fish on my work box for a while.

Collapse
 
bardware profile image
Bernhard Döbler

You write I should use the dialog "Turn Windows Features On or Off". You can use the store and install Ubuntu, also.
In the past I went your way and after installing the fall update 2017 I installed Ubuntu from the store. I now have two Linuxes running on Windows 10.

Collapse
 
hrmny profile image
Leah

chsh works fine on the wsl, but wsltty always explicitly starts bash

Collapse
 
darksmile92 profile image
Robin Kretzschmar

I had strange issues, for example tilix could not save the preferences and showed a dbus error.

Found the solution In this Reddit post:

3) Now we need to fix dbus: The issue with this was that by default, dbus uses unix sockets to communication, which windows bash at the moment doesn’t support. So we just need to tell it to use tcp. In /etc/dbus-1/session.conf, you need to replace unix:tmpdir=/tmp with tcp:host=localhost,port=0 and then you are done. Note this file needs root to edit. An easy way to do this is to execute the following:

sudo sed -i ‘s$<listen>.*</listen>$<listen>tcp:host=localhost,port=0</listen>$’ /etc/dbus-1/session.conf

Don't forget to restart the session afterwards!

Collapse
 
aptituz profile image
Patrick Schönfeld

Thanks for the article, took some tipps from it like ... for a terminal other than cmder.

Recently I tried to setup a decent dev environment on Windows 10 myself and you really share my sentiments.

I do think the movement at Microsoft is pretty cool and it's amazing what they did so far, but there really is a lot to do. One of the things is, on a MacOS system I do not have to enable magic windows features, after that install something from a ui application, find or decent terminal emulator or use the real awful included one and afterwards type bash ... to get a working shell.

In MacOS I just open a terminal and even if some might find iTerm2 to be better - the included one is already quiet decent.

But there is a lot more where it lacks behind IMHO.

Collapse
 
bgadrian profile image
Adrian B.G.

I really tried to make a nodejs project ran on WSL, after many compilation errors I found out it doesnt work with real projects. Also it state to not modify it's files with Windows software like an IDE so, it's cool but git bash is enough for me, and I moved the project to Cloud9 AWS.

Collapse
 
thomrainier profile image
Thomas • Edited

WSL is useless, no iptables, netfilter, firewalld, etc, as windows firewall is lacking fine grained control.

WSL won't even mount ext4 partitions on other drives.

Collapse
 
fire profile image
fire

Is that an app launcher dead center of the image? if so, which launcher are you using?

Collapse
 
rlipscombe profile image
Roger Lipscombe

What's the performance like? I tried WSL about a year ago and it was slooow...